Received: from ngate.rdw.ru ([195.42.172.254]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBD860M61754 for ; Wed, 13 Dec 2000 03:06:00 -0500 (EST) (envelope-from borz_off@rdw.ru) Received: (qmail 12133 invoked from network); 13 Dec 2000 08:06:23 -0000 Received: from unknown (HELO SPIDER) (192.168.0.212) by ngate1.rdw.ru with SMTP; 13 Dec 2000 08:06:23 -0000 Date: Wed, 13 Dec 2000 11:06:07 +0300 From: Alexey Borzov X-Mailer: The Bat! (v1.47 Halloween Edition) UNREG / CD5BF9353B3B7091 Reply-To: Alexey Borzov Organization: RDW X-Priority: 3 (Normal) Message-ID: <98912605.20001213110607@rdw.ru> To: =?ISO-8859-1?B?SGVydukgUGllZHZhY2hl?= CC: pgsql-php@postgresql.org Subject: Re[2]: pg_pconnect - Really persistent ? In-reply-To: <3A34A260.BB0E1490@elma.fr> References: <3A2E22FC.2E1A2C01@elma.fr> <1119521331.20001206150101@rdw.ru> <3A34A260.BB0E1490@elma.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200012/17 X-Sequence-Number: 60 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