Re: What could keep a connection / query alive? - Mailing list pgsql-general

From Derrick Rice
Subject Re: What could keep a connection / query alive?
Date
Msg-id AANLkTikVgt-1QsWQkRG4QKQDBf0N8CjNzrbZucrzS7bz@mail.gmail.com
Whole thread Raw
In response to Re: What could keep a connection / query alive?  (Jerry Sievers <gsievers19@comcast.net>)
Responses Re: What could keep a connection / query alive?  (Derrick Rice <derrick.rice@gmail.com>)
List pgsql-general


On Tue, Mar 29, 2011 at 3:17 AM, Jerry Sievers <gsievers19@comcast.net> wrote:

> What can cause this?? Why would these tcp and statement timeout settings not terminate the backend?

Try trussing the backend process.  You may find it in a network IO wait
trying to send data to a client that is hung or over a socket that was
timed out by a firewall or network equipment.

Such a condition will cause the backend to be unable to hear the
cancel.  The statement will still show as running in pg_stat_activity.

SIGTERM on such a backend will probably also fall on deaf ears.

I'm aware of that condition, which is exactly what the keepalive settings are supposed to detect.

# strace -p 32307
Process 32307 attached - interrupt to quit
send(6, "\252\0\17\0\0\0\01042810425\0\0\0\01010010333\0\0\0\27"..., 880, 0

The client is remote (not unix-domain socket) so I expect tcp_keepalive settings to kill this connection after 32 minutes.  That's not happening.  Not sure where else to look.

Derrick

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Curious case of the unstoppable user
Next
From: Raymond O'Donnell
Date:
Subject: Re: Curious case of the unstoppable user