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

From Derrick Rice
Subject What could keep a connection / query alive?
Date
Msg-id AANLkTinTECxxV9t0RY_Ubb9d2yc6huYTdW7OGpFA=eX2@mail.gmail.com
Whole thread Raw
Responses Re: What could keep a connection / query alive?  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
Hi folks,

I'm investigating (using 8.2) an instance of a database client connection remaining open in a single query well past statement timeout settings.  I understand that severed TCP connections can cause the backend to hang until the connection is closed, but our tcp keepalive settings should have recognized that condition after about 30 minutes.  The connection and backend didn't terminate for nearly 90 minutes.

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

Active Query Time (from pg_stat_activity): 01:27:44 - 00 days
Statement Timeout: 2 minutes
tcp_keepalives_idle=20min
(count and interval set to 0, using system defaults)

system keepalive settings are default for Linux, being:
count: 9
interval: 75

Expect severed connections to be detected within 20 min + 9*75s < 32min.

Thanks,

Derrick

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: A simpler time zone question
Next
From: Steve Crawford
Date:
Subject: Re: A simpler time zone question