Re: Stale Process - Mailing list pgsql-general

From scott.marlowe
Subject Re: Stale Process
Date
Msg-id Pine.LNX.4.33.0211110901140.22734-100000@css120.ihs.com
Whole thread Raw
In response to Re: Stale Process  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
On 10 Nov 2002, Doug McNaught wrote:

> Terence Leung <tcmleung@yahoo.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."


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: question about efficiency
Next
From: Jean-Luc Lachance
Date:
Subject: Re: Win2K Questions