Re: [GENERAL] Handling psql lost connections

2017-03-30 Thread Peter J. Holzer
On 2017-03-29 08:49:57 -0700, Steve Crawford wrote: > When firewalls/VPNs stand between my psql client and a remote PostgreSQL > server > the connection will on occasion time out and drop. This results in the > following scenario: > > -Leave for lunch mid project - leave psql open. > > -Return

Re: [GENERAL] Handling psql lost connections

2017-03-29 Thread JP Jacoupy
Not a response to OP but this also occurs with libpq connections. The only thing I found at the moment is to lower the net.ipv4.tcp_retries2 value to 8 (instead of 15). This will lower the TCP timeout from kernel to around 100 seconds instead of 15 minutes. Sent from ProtonMail mobile

Re: [GENERAL] Handling psql lost connections

2017-03-29 Thread Adrian Klaver
On 03/29/2017 11:48 AM, Steve Crawford wrote: On Wed, Mar 29, 2017 at 9:05 AM, Adrian Klaver > wrote: On 03/29/2017 08:49 AM, Steve Crawford wrote: When firewalls/VPNs stand between my psql client and a remote

Re: [GENERAL] Handling psql lost connections

2017-03-29 Thread Steve Crawford
On Wed, Mar 29, 2017 at 9:05 AM, Adrian Klaver wrote: > On 03/29/2017 08:49 AM, Steve Crawford wrote: > >> When firewalls/VPNs stand between my psql client and a remote PostgreSQL >> server the connection will on occasion time out and drop. This results >> in the

Re: [GENERAL] Handling psql lost connections

2017-03-29 Thread Adrian Klaver
On 03/29/2017 08:49 AM, Steve Crawford wrote: When firewalls/VPNs stand between my psql client and a remote PostgreSQL server the connection will on occasion time out and drop. This results in the following scenario: -Leave for lunch mid project - leave psql open. -Return from lunch, complete

[GENERAL] Handling psql lost connections

2017-03-29 Thread Steve Crawford
When firewalls/VPNs stand between my psql client and a remote PostgreSQL server the connection will on occasion time out and drop. This results in the following scenario: -Leave for lunch mid project - leave psql open. -Return from lunch, complete and submit large query. -Notice query is taking