We have a postgresql server configured with max_connections=4096.
We have such a high number of max_connections because there are 8 web
servers connected to the database and all use persistent connections.
Each web server can have 256 max clients and 2 connection strings, so
the max connections to the db is 256 * 8 * 2=4096.
To start the postgresql, I must to do some kernel extra configuration:
kernel.shmmax = 1165063808
kernel.sem=512 64000 100 512
and the parameters i changed other than max_connections in the
postgresql.conf are:
- shared_buffers = 131072
- checkpoint_segments = 32
We are doing pre-production tests and we encountered the following problems:
- The database server is generally low loaded except when the postgres
recycles a transaction log file.
- This causes the apache frontends to slow down and to do all together
the most heavy operation (that is five inserts in five different tables
and a delete)
- After some time the postgresql starts giving the message "WARNING:
there is already a transaction in progress". It seems like the apache
frontend didn't close correctly the previous connection living a
transaction open but I'm not sure this is the only problem.
Could anyone have suggestions or tips for the postgres configuration and
the problem we're encountering?
The postgresql version is 7.4.8 on a Dual Xeon with 4Gb of Ram.
Apache frontends are Apache 1.3.33 with PHP 4.3.11.
Thank you in advance,
Denis Gasparin
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster