Re: pgAdmin hang on connection drop/reconnect - Mailing list pgadmin-support

From Willy-Bas Loos
Subject Re: pgAdmin hang on connection drop/reconnect
Date
Msg-id 1dd6057e0904230451t5a93fe8dq9c56163e77cbab8e@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin hang on connection drop/reconnect  (Willy-Bas Loos <willybas@gmail.com>)
List pgadmin-support
There are tcp_keepalives on the server side of postgresql<br />The problem was that debian waits 2 hours before
startingthe keepalives (7200 s).  <br />Also, the connection would only be kept alive for 9*75 s, which is 11 min.<br
/><br/>So i changed the tcp_keepalives_idle to 120  (keepalives start after 2 min) <br />and the tcp_keepalives_count
to 200 (max 200 keepalives are sent, every 75 secs, so the connection is kept alive for 120+(200*75) secs, which is 4.2
hours.<br/><br />It seems to have worked.<br />I'll check if it works on Windows.<br /><br />==in postgresql.conf==<br
/>#- TCP Keepalives -<br /># see "man 7 tcp" for details<br /><br />#tcp_keepalives_idle = 0                #
TCP_KEEPIDLE,in seconds;<br />                                         # 0 selects the system default<br
/>#tcp_keepalives_interval= 0            # TCP_KEEPINTVL, in seconds;<br />                                        # 0
selectsthe system default<br />#tcp_keepalives_count = 0               # TCP_KEEPCNT;<br />
                                       # 0 selects the system default<br /><br /><br /><br />==in man 7 tcp (debian
lenny)==<br/>       tcp_keepalive_intvl (integer; default: 75)<br />              The number of seconds between TCP
keep-aliveprobes.<br /><br />       tcp_keepalive_probes (integer; default: 9)<br />              The maximum number of
TCPkeep-alive probes to send before giving up and killing the connection if no response is obtained from the other
end.<br/><br />        tcp_keepalive_time (integer; default: 7200)<br />              The  number  of  seconds  a 
connection needs to be idle before TCP begins sending out keep-alive probes.  Keep-alives are only sent when the
SO_KEEPALIVEsocket<br />               option is enabled.  The default value is 7200 seconds (2 hours).  An idle
connectionis terminated after approximately an  additional  11  minutes  (9  probes  an<br />              interval of
75seconds apart) when keep-alive is enabled.<br /><br />              Note that underlying connection tracking
mechanismsand application timeouts may be much shorter.<br /><br />Cheers,<br /><br />WBL<br /><br /> 

pgadmin-support by date:

Previous
From: Tore Halvorsen
Date:
Subject: pgAmin 1.10 beta 2 and slony schema
Next
From: Guillaume Lelarge
Date:
Subject: Re: system database flag?