Re: [Phplib-users] pgsql - too many clients?
Brought to you by:
nhruby,
richardarcher
From: Stephen W. <wo...@me...> - 2001-11-21 17:57:08
|
Frank Bax wrote: > I am running several virtual hosts, each with their own database. > I determined that my 32 connections was the pgsql "max_connections". I believe this is WHY the pconnects can not be reused. They can only be reused if it is connecting to the same database, with the same user/passwd, and there might be another condition that escapes me. So .... if process A pconnects to DB1 for this hit, then process A pconnects to DB2 for the next hit it can't use the DB1 handle so it pconnects to DB2, but never frees DB1 handle and if on a a third hit it wants DB3 it now has three handles tied up and if it recycles back to DB1 it may or may not be able to reuses the handle so it can grab yet another DB1 handle, etc. Now multiply that by the number of httpd processes and you run out of handles/connections very quickly. -Steve |