Postgresql with max_connections=4096

From: denis(at)edistar(dot)com
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Postgresql with max_connections=4096
Date: 2005-07-27 07:09:59
Message-ID: 42E73347.7010500@edistar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philippe Lang 2005-07-27 07:47:59 Re: Trigger disactivation and SELECT WAITING
Previous Message Mark Mikulec 2005-07-27 04:27:41 Backup and restore from 7.4.1 to latest, crossing platforms... issues?