Keep Alives, Operation over a Wide Area Network

DP4 TCP/IP software uses a system of keep alive messages from the client to the network manager to manage connections. This enables the network manager to drop connections and perform the necessary tidying up if a client application terminates abnormally or if the physical network connection is broken. The scheme works as follows: The network manager maintains a timer for each active connection. This timer is restarted whenever a message is received on that connection. If an application does not access the server for a specified length of time, TCPn sends a keep alive message to restart the network manager's timer on that connection. If the timeout period on the network manager expires without being reset by a message, which may be either a genuine database request or a keep alive message, the connection is dropped and the user(s) logged off the database manager. The various timeouts are determined by the timeout parameter as follows:

It is essential that any timeout value supplied on the command line be the same for all clients and network managers on the network. The command tail −deadtime n can be used on tcpmgr to extend the period that the network manager will wait for a message or keepalive before disconnecting the client. n is given in seconds. Obviously only values of n greater than the timeout value make sense. This may be of use on slow networks where the delivery of keepalive messages may be unreliable for some reason (such as unsafe buffering algorithm within the TCP/IP implementation). Keep alive messages are handled much more reliably in 4.520 and later versions of DP4 networking. Older versions of the network manager might fail to see a keep alive because the network manager was busy processing other requests. This cannot happen after 4.520/4.616

It is possible to turn off keepalives if necessary. See information on the nokeepalive option. You may wish to disable keepalives where a WAN is in use, especially if there are a large number of users, or keeping connections live unnecessarily is expensive. If keepalives are not disabled a message will be sent every few seconds, keeping the line active.