Re: Postgres tcp_keepalive_xxxx parameters.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jlrando <jose(dot)luis(dot)rando(dot)calvo(at)ericsson(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres tcp_keepalive_xxxx parameters.
Date: 2014-10-01 15:04:06
Message-ID: 10398.1412175846@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jlrando <jose(dot)luis(dot)rando(dot)calvo(at)ericsson(dot)com> writes:
> We have an issue with postgres clients tha are being disconnected from
> database server after some time. Client is a web application which creates a
> pool of connections. Since client and server are on different VLANS I think
> the problem is that the FW which is routing traffic is droping idle
> connections after some time.

Probably. It might be asymmetric; have you tried enabling keepalives
from the client end, rather than the server? If using libpq, you can
set keepalive parameters in the connection string:
http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS

If that doesn't fix it, you might want to get out Wireshark or a similar
tool and verify that keepalive packets are actually getting sent.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Brusselback 2014-10-01 15:09:15 Re: table versioning approach (not auditing)
Previous Message Daniel Begin 2014-10-01 15:00:27 Re: Best practices for Large import in empty database?