TCP/IP uses operating system keepalive parameters to detect when the client or server side of an idle connection is no longer responding. DB2 sets the TCP/IP keepalive setting on both the client and server by default.
You may wish to decrease the keepalive parameters on the server side machine to improve detection of client failures, or decrease the keepalive parameters on the client side machine to improve detection of server failures. Alternatively, you may wish to increase the keepalive parameters on the server side machine to prevent client disconnects on idle connections, or increase the keepalive parameters on the client side machine to prevent server disconnects on idle connections.
Each keepalive parameter comes with a default setting; many parameters are configurable. In general, the parameters:
Determine how long to wait before probing the idle connection. On most platforms the default is 2 hours.
Determine how long to wait before retrying the probe after initial failure to respond.
Determine the maximum number of times to retry the probe.
Modifying any keepalive parameter may involve trade-offs and affects applications on your entire machine. For example, changing these parameters affects rlogin, ssh, and telnet. You may wish to reset additional TCP/IP parameters, depending on the overall impact to other TCP/IP parameters. Contact your operating system administrator for help with setting these values. describes how to display and modify keepalive values on various operating systems.
Technical article 1231084 describes how to display and modify keepalive values on various operating systems: