Re[2]: pg_pconnect - Really persistent ?

From: Alexey Borzov <borz_off(at)rdw(dot)ru>
To: Hervé Piedvache <herve(at)elma(dot)fr>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re[2]: pg_pconnect - Really persistent ?
Date: 2000-12-13 08:06:07
Message-ID: 98912605.20001213110607@rdw.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Hervé Piedvache 2000-12-13 11:40:26 Re: pg_pconnect - Really persistent ?
Previous Message Aarmel 2000-12-12 05:12:08 I give up.