From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Doug McNaught <doug(at)mcnaught(dot)org> |
Cc: | Terence Leung <tcmleung(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Stale Process |
Date: | 2002-11-11 16:08:39 |
Message-ID: | Pine.LNX.4.33.0211110901140.22734-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10 Nov 2002, Doug McNaught wrote:
> Terence Leung <tcmleung(at)yahoo(dot)com> writes:
>
> > Dear sir,
> > I built Apache, PHP-PostgreSql 7.1 web server in Linux
> > Redhat 7.0.
> > I always check the process by 'ps -aux' and always
> > found the stale postmaster processes:
>
> It's most likely that PHP is keeping the connections open for some
> reason. The 'postgres' processes are in S (sleep) state, which
> indicates that their socket is still being held open by the client
> end. So it's probably not a Postgres problem... I find it entirely
> unsurprising that PHP might be buggy. ;)
Yes, he should switch immediately to a bug free language, like maybe Java.
It's a poor craftsman who blames his tools.
Anyway, now that we've gotten our jabs in on our non-favorite language,
mayhaps we can help the newbie?
I've never seen PHP hold a connection open when it wasn't opened
using pconnect.
It's possible that some page on the box DOES have a pg_pconnect in it
somewhere. That's where I'd look first.
It's also possible that a user has a psql connection up and running. If
you've got a psql monitor open, you'll see an idle backend process waiting
to take you queries and run them.
Lastly, a single idle process is NO BIG DEAL. If your database only has
two connections to it at idle, and 100 at heavy load, the extra idle
connection is below the noise threshold of "things to be worried about."
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2002-11-11 16:19:08 | Re: SQL Tuning |
Previous Message | Stephan Szabo | 2002-11-11 15:56:38 | Re: question about efficiency |