Re: Clients disconnect but query still runs - Mailing list pgsql-general

From Csaba Nagy
Subject Re: Clients disconnect but query still runs
Date
Msg-id 1248954394.24829.63.camel@pcd12478
Whole thread Raw
In response to Re: Clients disconnect but query still runs  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
[just to make things clear, I'm not the one who brought up this
discussion, only that I was also bitten once by zombie connections]

On Thu, 2009-07-30 at 13:29 +0200, Craig Ringer wrote:
> Idle? I thought your issue was _active_ queries running, servicing
> requests from clients that'd since ceased to care?

No, the problem was zombie connections idle in transaction.

> How did you manage to kill the client in such a way as that the OS on
> the client didn't send a FIN to the server anyway? Hard-reset the client
> machine(s)?

It was a runaway client box in swapping hell. It had plenty of open
connections, mostly of which idle in transaction (because it started to
take veeery long to do it's processing between the queries).

> I thought your issue was the backend not terminating a query when the
> client died while the backend was in the middle of a long-running query.
> Keepalives alone won't solve that one.

No, that is not so dangerous for us, usually we chunk our queries coming
from applications that they can't run too long at all. But it seems that
if I lower the network timeout then even the crashed client scenario
could be OK, I will have to test that...

Cheers,
Csaba.



pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: Clients disconnect but query still runs
Next
From: Sachin Srivastava
Date:
Subject: Re: How do I run PG Tuning Wizard on Linux?