[horde] PostgreSQL connection limit problem

Eric Jon Rostetter eric.rostetter at physics.utexas.edu
Tue Mar 21 12:13:31 PST 2006


Quoting "Daniel A. Ramaley" <daniel.ramaley at DRAKE.EDU>:

>> Make your postgresql connection limit at least as great as your httpd
>> children limit.
>
> That's easy enough to do. Thanks for the tip. I'll keep an eye on the
> server for awhile to make sure this fixes it.

I guess I should have said to be sure to restart postgresql after making
the changes, so they take effect.  I normally stop apache, restart postgresql,
start apache.

> PostgreSQL's limit was initially set to 100. I set it to 256, which is
> what Apache's MaxClients was set to. I seriously doubt we had 100
> simultaneous users on the system before, but maybe Apache holds onto
> connections longer than it needs to and hit the limit that way.

If you are using persistent connections, then each apache child will keep
one postgres connection open, even when idle.  A web indexer or two (google,
yahoo, etc) in addition to your normal load can easily run your child count
up.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Go Longhorns!


More information about the horde mailing list