Re[2]: pg_pconnect - Really persistent ? - Mailing list pgsql-php

From Alexey Borzov
Subject Re[2]: pg_pconnect - Really persistent ?
Date
Msg-id 98912605.20001213110607@rdw.ru
Whole thread Raw
In response to Re: pg_pconnect - Really persistent ?  (Hervé Piedvache <herve@elma.fr>)
List pgsql-php
Greetings, Hervé!

At 11.12.2000, 10:56, you wrote:
>> 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.

HP> OK .. I would like more precision of your configuration please, or to
HP> configure my system ...

HP> I do what you said ... but still have trouble with postgresql ... I have
HP> a message like too many files opened in same time ... on the postgresql
HP> server my max limit is 8192 files ... !! So to save my trouble for the
HP> moment the only way I found is to cron a apache graceful each minute !
HP> :(((
    Increase the limit on open files: now each postgres can have
8192/256=32 open files max, and it needs to have much more...

HP> #
HP> StartServers 20
HP> MinSpareServers 64
HP> MaxSpareServers 128
HP> #
    Isn't MaxSpareServers a bit high? At each given time you can have
128 idle Apaches and each of these 2 idle Postgreses connected (256
total), which is actually your limit. Ouch!


--
Yours, Alexey V. Borzov, Webmaster of RDW



pgsql-php by date:

Previous
From: Aarmel
Date:
Subject: I give up.
Next
From: Hervé Piedvache
Date:
Subject: Re: pg_pconnect - Really persistent ?