From: Andrew McMillan <andrew@catalyst.net.nz>
To: Frank Bax <fbax@sympatico.ca>
Cc: Marco Colombo <marco@esi.it>
Cc: Chris Ruprecht <chrup999@yahoo.com>
Cc: PostGreSQL PHP Group <pgsql-php@postgresql.org>
Subject: Re: pg_pconnect - ??
Date: 01 Feb 2002 21:14:04 +1300
Message-ID: <1012551244.6915.1351.camel@kant.mcmillan.net.nz> (raw)
In-Reply-To: <3.0.6.32.20020131152838.007c9de0@pop6.sympatico.ca>
References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca>
<3.0.6.32.20020131152838.007c9de0@pop6.sympatico.ca>
On Fri, 2002-02-01 at 09:28, Frank Bax wrote:
>
> Ah, I hadn't considered that, query time dominates all my scripts.
Then persistent connections are probably less useful, but don't be sure
until you have measured the difference. If those long-running queries
visit the same data, and if you have a large enough -B (those buffers
are shared, remember), then there could still be significant benefit.
> Another thing I've noticed. Just for the record ... Persistent connections
> do appear to go away after time. When I used them on my relatively idle
> (compared to many) server, there almost always were none early in the
> morning. With non-scientific methods, and random observations I determined
> that the time period was probably between one hour and one day.
>
> Too bad all this info about factors affecting pg_pconnect weren't all in
> one place...
Apache will recycle it's client processes, so if you have applications
which do _not_ access the persistent connections then enough requests
will be made over time to cause this to happen.
When Apache recycles those processes (MaxRequestsPerChild), the
persistent connections will be closed. The new process will not have a
persistent connection until one is requested. From what you describe is
happening I would guess you have a small part of your application using
these, possibly some part that only you access.
Cheers,
Andrew.
--
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
Are you enrolled at http://schoolreunions.co.nz/ yet?
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: andrew@catalyst.net.nz, fbax@sympatico.ca, marco@esi.it, chrup999@yahoo.com
Subject: Re: pg_pconnect - ??
In-Reply-To: <1012551244.6915.1351.camel@kant.mcmillan.net.nz>
References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca> <3.0.6.32.20020131152838.007c9de0@pop6.sympatico.ca> <1012551244.6915.1351.camel@kant.mcmillan.net.nz>
* 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