RE: How to prevent "no wait lock" after a connection drop

From: Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr>
To: <pgsql-general(at)postgresql(dot)org>
Subject: RE: How to prevent "no wait lock" after a connection drop
Date: 2018-08-03 20:45:15
Message-ID: 00a901d42b6a$e203bad0$a60b3070$@1nar.com.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Sent: Wednesday, August 1, 2018 1:34 AM
> To: Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr>
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: How to prevent "no wait lock" after a connection drop
>
> =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr>
writes:
> > What I observe during my tests is that if I intentionally drop
> > internet connection during any stage of data transfer (that is mostly
> > while inserting to tables) application gives error and stop. For next
> > sync operation (which runs every 5 mins) gets "no wait lock" error and
> > exit without doing anything. That lock stage roughly stays for 1-2 hours
or more.
>
> This probably corresponds to the TCP timeout needed for the server's
kernel to decide the connection is lost; until then, the > backend session
will just sit there waiting for more data, and it'll be holding whatever
locks it had too.
>
> You could adjust the server's tcp_keepalives_xxx settings to make it
notice the connection drop more quickly.
>
> regards, tom lane

Hello,

Server TCP timeout parameters set to identify a dropped connection in 3.5
minutes max. I am waiting for test results.

Thanks & regards,
Ertan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2018-08-03 20:59:22 Re: Pg_rewind cannot load history wal
Previous Message Ertan Küçükoğlu 2018-08-03 20:41:58 Eror while dropping a user