[imp] postgresql maxing out

Rick Emery rick@emery.2y.net
Sat Nov 2 02:27:39 PST 2002


Quoting Eric Rostetter <eric.rostetter@physics.utexas.edu>:

> To those having problems with postgresql maxing out available connections,
> a question:
> 
> Do you have your apache web server creating more children than you allow
> postgresql connections?
> 
> It seems if you're using php with connection pooling (i.e. pg_pconnect) then
> each apache child spawned will keep open any connection it opens for reuse.
> So if your child limit in apache is higher than your allowed connections to
> postgresql, you can run out of postgresql connections...
> 
> I'm betting this is the problem.  I never see this as my max httpd clients
> is less than my max postgresql connections...  I've checked, and my number
> of postgresql jobs is almost always the same as the number of apache jobs
> minus one.

Sorry that it's taken me so long to reply to this, especially since you're 
trying to help. My friend and I both switched to MySQL, so I'm not really in a 
position to test this, but I think you may be right on the money.

If I'm looking in the right place, httpd.conf has "MaxClients 150". This is 
significantly larger than the max 32 connections allowed by my postgresql 
install. If I understand you correctly, setting MaxClients to 31 or below would 
solve the problems I was experiencing.

Thanks for the info. This is good to know, and maybe the other person that was 
seeing this problem can benefit.

Rick



More information about the imp mailing list