Re: Timeout and wait-forever in sync rep

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Timeout and wait-forever in sync rep
Дата
Msg-id AANLkTinnxTkpv3QBFOKTu-tY-pY3Q70nVvhsCbQ_FJ8a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Timeout and wait-forever in sync rep  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Timeout and wait-forever in sync rep  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Tue, Oct 19, 2010 at 1:06 AM, Greg Stark <gsstark@mit.edu> wrote:
> On Mon, Oct 18, 2010 at 12:03 AM, Fujii Masao <masao.fujii@gmail.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.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления:

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: security hook on table creation
Следующее
От: Peter Eisentraut
Дата:
Сообщение: comments on type attributes broken in 9.1devel