From: | jlrando <jose(dot)luis(dot)rando(dot)calvo(at)ericsson(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Postgres tcp_keepalive_xxxx parameters. |
Date: | 2014-10-01 14:57:40 |
Message-ID: | 1412175460068-5821282.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi.
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.
Os is CentOS 5.10 and kernel config is as follows:
root(at)itk-iv-mcs ~ # sysctl -a | grep keepalive
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200
tcp_keepalive_xxx in postgresql.conf were set to 0 all. Then we tried to set
tcp_keepalives_idle = 60 # TCP_KEEPIDLE, in seconds;
tcp_keepalives_interval = 60 # TCP_KEEPINTVL, in seconds;
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
So effective values (I guess are) 60,60 and 9 (system default). Even with
this configuration the cliens are being disconnected as before.
At this point I am not sure if I have understood properly the way keepalive
is working or not, becase if PG will send a packet after 60 seconds of
inactivity and the client respond ok then it will not retry and wait for
"tcp_keepalives_idle" seconds again... and so on. Then "interval" and
"count" are used only in case the client does not respond. If this is true
and I am not wrong then we can discard this issue as FW issue regarding idle
connections... Is this the behaviour of the tcp_keepalives_xxx parameters?
Is there any more I have to setup or check to make keepalive work?
Do you know how can we sort out this issue?
Thanks in advance.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-tcp-keepalive-xxxx-parameters-tp5821282.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Begin | 2014-10-01 15:00:27 | Re: Best practices for Large import in empty database? |
Previous Message | Andy Colson | 2014-10-01 14:41:14 | Re: Best practices for Large import in empty database? |