0

The parameter controls how frequently TCP tries to verify that an idle connection is still intact by sending a keepalive packet. If the remote computer is still reachable and functioning, the remote computer acknowledges the keepalive transmission. By default, keepalive packets are not sent. A program can turn on this feature on a connection.

The default for KeepAliveTime is 2 hours. This seems way too long. If I have a dead network connection, I want to know about it and have the application respond to it much sooner than 2 hours later. I don't see any issue with setting this value as low as 5 minutes - the bandwidth usage would be negligible.

Why is the default for KeepAliveTime so long and is it safe to set it to a lower number, e.g. 5 minutes?

Jim
  • 563

1 Answers1

1

It may make sense to lower the keepalive time if you are running a server that wants to know whether its clients are still alive, and your application sets the keepalive socket option. Setting this to 5 minutes is pretty reasonable in that case.

Consider for example this advice given to users of the ESRI CAD software on configuring keepalive: http://support.esri.com/ja/knowledgebase/techarticles/detail/25129

Would it matter for your application that a socket stays open for 5 minutes or 2 hours?