Re: What could keep a connection / query alive?

From: Derrick Rice <derrick(dot)rice(at)gmail(dot)com>
To: Jerry Sievers <gsievers19(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What could keep a connection / query alive?
Date: 2011-03-29 18:54:09
Message-ID: AANLkTikVgt-1QsWQkRG4QKQDBf0N8CjNzrbZucrzS7bz@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 29, 2011 at 3:17 AM, Jerry Sievers <gsievers19(at)comcast(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Worgan, Craig (Craig) 2011-03-29 19:13:20 RPM for ODBC driver
Previous Message Thom Brown 2011-03-29 18:44:51 Curious case of the unstoppable user