RE: Hung backends

From: "Schmidt, Peter" <peter(dot)schmidt(at)prismedia(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Schmidt, Peter" <peter(dot)schmidt(at)prismedia(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: RE: Hung backends
Date: 2000-11-24 17:02:42
Message-ID: F1DC8388AD52D411B83B00D0B774D6EB192805@winmail.prismedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It turned out the Java VM was still running on the clients, keeping TCP
connections open (exactly as you suggested). When the VM process is killed
all backends are cleaned up.
Thanks,
Peter

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, November 23, 2000 9:35 AM
To: Schmidt, Peter
Cc: 'pgsql-general(at)postgresql(dot)org'
Subject: Re: [GENERAL] Hung backends

"Schmidt, Peter" <peter(dot)schmidt(at)prismedia(dot)com> writes:
> The java frontend I'm using to test this scenario makes multiple
connections
> and crashes(unhandled exception) before disconnecting. This appears to
leave
> one "postgres" proccess for each connection. Can anyone point me in the
> right direction?
> SELECT version(); -> PostgreSQL 7.0.2 on i386-unknown-freebsdelf4.0

Hm. I'd definitely recommend updating to 7.0.3 if you are using
unreliable clients, because 7.0.2 forgets to run its transaction-abort
routine if the client disconnects mid-transaction, with various
annoying consequences. However, that wouldn't lead to the
above-described symptom.

It looks like the backends don't know that their clients have gone away,
which would suggest that the kernel is failing to deliver an EOF
indication on the socket connection. Are you using TCP connections,
or Unix sockets? Is there some other process that could be holding the
client end of the connection open?

regards, tom lane

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-24 17:08:09 Re: Skipping numbers in a sequence.
Previous Message Peter Eisentraut 2000-11-24 17:02:15 Re: create snapshot?