Magnus Hagander <mag...@hagander.net> wrote: > Windows default for idle is 2 hours, for interval 1 second. And it defaults to five retries. With these settings, you could have a TCP connection break with as little as a five second network outage, if it happened to come after two hours of silence on the connection; although an outage of up to two hours could go totally unnoticed. The RFC values have a total of nine tries at 75 second intervals, so for a single network outage to break a connection, it would have to last at least ten minutes; but again, an outage of up to two hours could occur before it started to check for problems. I'm inclined toward option 2 (previously described on this thread), because the Windows defaults are dumb. Wait two hours and then test for five seconds??? I also think we may want to suggest that for most environments, people may want to change these settings to something more aggressive, like a 30 to 120 second initial delay, with a 10 or 20 second retry interval. The RFC defaults seem approximately right for a TCP connection to a colony on the surface of the moon, where besides the round trip latency of 2.5 seconds they might have to pay by the byte. In other words, it is *so* conservative that I have trouble seeing it ever causing a problem compared to not having keepalive enabled, but it will eventually clean things up. In practice people usually want something more aggressive. -Kevin
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers