pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexey Borzov <borz_off@rdw.ru>
To: Hervé Piedvache <herve@elma.fr>
Cc: pgsql-php@postgresql.org
Subject: Re[2]: pg_pconnect - Really persistent ?
Date: Wed, 13 Dec 2000 11:06:07 +0300
Message-ID: <98912605.20001213110607@rdw.ru> (raw)
In-Reply-To: <3A34A260.BB0E1490@elma.fr>
References: <3A2E22FC.2E1A2C01@elma.fr>
	<1119521331.20001206150101@rdw.ru>
	<3A34A260.BB0E1490@elma.fr>

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





Message-ID: <98912605.20001213110607@rdw.ru>
Permalink:  ../98912605.20001213110607@rdw.ru/
Also on:    postgresql.org/message-id/98912605.20001213110607@rdw.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: borz_off@rdw.ru, herve@elma.fr
  Subject: Re: pg_pconnect - Really persistent ?
  In-Reply-To: <98912605.20001213110607@rdw.ru>
  References: <3A2E22FC.2E1A2C01@elma.fr> <1119521331.20001206150101@rdw.ru> <3A34A260.BB0E1490@elma.fr> <98912605.20001213110607@rdw.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox