From: Milen A. Radev <milen@radev.net>
To: pgsql-admin@postgresql.org
Subject: Re: Postgresql, number of connections and life time
Date: Sat, 28 Jan 2006 18:40:03 +0200
Message-ID: <43DB9E63.3080600@radev.net> (raw)
In-Reply-To: <43DB2942.3040009@ono.com>
References: <43DB2942.3040009@ono.com>
Juan Miguel writes:
[...]
> First.
> I have a Linux box with postgres 7.4 branche, where web php applications
> queries the DB. When Apache launches a php file that connects to the DB,
> if I do "ps aux | grep postgrest", I can see a process "postgres user
> ...." running, that represents the session openned to the DB. But when
> the php program finishes, and closes the connection, this process does
> not end. Therefore the number of processes are growing while people
> visit the web. ¿ Why ? I see the php code, and there is a closing
> command before end.
> I see that sometimes I visit a page that connects to the DB and no new
> process is performed or remains. I also realise that after several hours
> (for example at midnight) those processes don't exist.
> What is happening ? Is it usual ? Is there a param to control the number
> of process launched and their life times?
> In PHP I don't use a pool of connections because, the problem is the
> same (there are several processes, and remain after connection closes).
[...]
May be the PHP application uses persistent connections
(http://www.php.net/manual/en/function.pg-pconnect.php)?
--
Milen A. Radev
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-admin@postgresql.org
Cc: milen@radev.net
Subject: Re: Postgresql, number of connections and life time
In-Reply-To: <43DB9E63.3080600@radev.net>
References: <43DB2942.3040009@ono.com> <43DB9E63.3080600@radev.net>
* 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