With TCP/IP sockets, when any network cable is unplugged will cause a loss of connection without any notification. This issue is hard to detect in systems which do not support heartbeat messages. To address this issue at the socket level, one recommended approach is to use TCP keepalive mechanism that can be used to detect Dead Peers/Process crash/NW cable disconnect. It requires one to enable TCP/IP networking in order to use it.
In Linux system, by adjusting the following 3 system parameters we could detect NW disconnect issue within a certain time duration
Code changes: Enable Tcp Keepalive with setsockopt function call
But ON the Solaris platform(CMS) this is not working consistently
Noticed that Solaris supports only 2 parameters: tcp_time_wait_interval and tcp_keepalive_interval it does not have ‘tcp_keepalive_probes’ so how can one specify the number of re-tries before disconnecting? Is there any other parameters that we need to adjust to be able fix the timeout for disconnect? Please help in fixing this issue