On Aug 4, 2004, at 8:45 AM, Paul Serby wrote:

Apache on the Web server can take up to 300 connections and PHP is using pg_pconnect

Postgres is set with the following.

max_connections = 300
shared_buffers = 38400
sort_mem = 12000

But Apache is still maxing out the non-super user connection limit.

Did you restart PG after making that change? (you need to restart, reload won't change max_connections)

Also, you're sort_mem is likely too high (That is the amount of memory that can be used PER SORT) and you s hould back down on shared_buffers. (General consensus is don't go over 10k shared buffers)

Another thing you may want to try is using pgpool and regular pg_connect - this way you only have a pool of say, 32 connections to the DB that are shared among all apache instances. This gets rid of the need to have hundreds of idle postgres' sitting around. Connecting to pgpool is very fast. We use it in production here and it works wonderfully. And it is 100% transparent to your application.


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?


Reply via email to