Re: pg_pconnect - Really persistent ?
От | Alexey Borzov |
---|---|
Тема | Re: pg_pconnect - Really persistent ? |
Дата | |
Msg-id | 1119521331.20001206150101@rdw.ru обсуждение исходный текст |
Ответ на | pg_pconnect - Really persistent ? (Hervé Piedvache <herve@elma.fr>) |
Список | pgsql-php |
Greetings, Hervé! Well, there are some problems, indeed. 1) PHP counts connections on a per-process basis. So, when you have, say, 10 httpd processes, and a limit of 10 connections is set in php.ini, you can have total of 100 postgres backends, with a default limit of 32. 2) PHP does not reuse persistent connections when it can open a new one. So set a limit of pconnections to 1 or 2 in php.ini, and everything will work as intended. At 06.12.2000, 14:43, you wrote: HP> I have some troubles with the pg_pconnect function ... HP> All my PHP scripts are using pg_pconnect but apache seems to not using HP> the persistent connection ... ? HP> I mean that when I make a small script usign a pg_pconnect, and a simple HP> select ... I open 2 browsers and call many time my scrip, I look for the HP> backends of postgresql and I see many backends opened ! HP> If I try for example to limit the backend to 35, and run an ab (apache HP> bench) to call the page ... after the 35 connections opened postgresql HP> say there is no more connection possible ... ok ! but why the HP> persistents connexions are not re-used ? -- Yours, Alexey V. Borzov, Webmaster of RDW
В списке pgsql-php по дате отправления: