From: scott.marlowe <scott.marlowe@ihs.com>
To: Sylvain Ross <jfk@fleming.u-psud.fr>
Cc: pgsql-php@postgresql.org
Subject: Re: What is wrong with pg_pconnect() ?
Date: Mon, 15 Dec 2003 14:54:34 -0700 (MST)
Message-ID: <Pine.LNX.4.33.0312151447590.3829-100000@css120.ihs.com> (raw)
In-Reply-To: <IAEMIKOELLIGJPKPFJBOEECKCAAA.jfk@fleming.u-psud.fr>
As Rod pointed out, you likely aren't having dead apache children, just
too many.
IF you must have pconnects in your code, then you need to configure your
apache server and postgresql server so that the postgresql server can
spawn more children than the apache server.
Set MaxClients in httpd.conf to something MUCH lower than the default
of 150. Usually 20 to 50 will be plenty. Restart apache.
Then, set postgresql to handle at least 2x as many backends as with the
max_connections setting and restart it.
Now, you should be able to handle pconnects.
My personal testing has shown my dual PIII-750 (being retired at the end
of the month) can handle about 1,000 to 10,000 pg_connects a second, and
about 100,000 to 1,000,000 pg_pconnects a second. Since the average page
build / delivery time on our intranet server is around 0.5 to 1.5 seconds,
the speed of connections is pretty much noise. We have templating,
database accesses, and httpd authentication via LDAP on each page, and the
biggest eater of CPU time is the httpd->LDAP authentication, followed by
the templating, followed by the database layer. I.e. Postgresql and its
connections are the least of our worries. :-0
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: scott.marlowe@ihs.com, jfk@fleming.u-psud.fr
Subject: Re: What is wrong with pg_pconnect() ?
In-Reply-To: <Pine.LNX.4.33.0312151447590.3829-100000@css120.ihs.com>
References: <IAEMIKOELLIGJPKPFJBOEECKCAAA.jfk@fleming.u-psud.fr> <Pine.LNX.4.33.0312151447590.3829-100000@css120.ihs.com>
* 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