On Tue, Oct 19, 2010 at 1:06 AM, Greg Stark <gsstark(at)mit(dot)edu> wrote:
> On Mon, Oct 18, 2010 at 12:03 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> The keepalives don't work at least on linux when the connection is terminated
>> after sending a packet and before receiving TCP-level ACK. You can confirm
>> this by unplugging the LAN cable from a client server while running pgbench
>> on a client.
> What do you mean by "don't work"?
I mean, for example, that the server cannot detect the disconnection for
more than 60 seconds even if the user configures the keepalive as follows.
tcp_keepalives_idle = 10
tcp_keepalives_interval = 5
tcp_keepalives_count = 2
> In this case no additional packets
> would be needed since the regular ack would serve the same purpose.
> How long did you wait to test whether it would work? It takes quite a
> while before the connection would time out.
Yep. In the case where the keepalive doesn't work, usually TCP retry
timeout makes the server detect the disconnection. The detection time
depends on the kernel parameter tcp_retries1 and tcp_retries2. AFAIR,
it's several minutes by default.
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
In response to
pgsql-hackers by date
|Next:||From: Peter Eisentraut||Date: 2010-10-19 05:46:45|
|Subject: comments on type attributes broken in 9.1devel|
|Previous:||From: KaiGai Kohei||Date: 2010-10-19 04:34:00|
|Subject: Re: security hook on table creation|