Knowledge Base - Technical Articles


Technical Article   HowTo:  Change the operating system's 'keepalive' settings

Article ID: 25129
Software:  ArcSDE 3.0, 3.0.1, 3.0.2, 3.0.2.1, 3.0.2.2, 8.0.1, 8.0.2, 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1
Platforms: N/A

Summary

The UNIX, Linux and Windows operating systems use a 'keepalive' setting to test idle TCP connections and ensure they are still active. By default, 'keepalive' is set to 7200000ms (2 hours). This means that every 2 hours the server machine tests the idle TCP connection by pinging the client machine from where the connection is coming. If the server gets no response back from the client, then 'keepalive' terminates the idle connection. The 'keepalive' interval can be modified by configuring the operating system to reduce the time from 2 hours to 5 minutes.

Occasionally, an ArcSDE application server connection (gsrvr) may get left behind on the server, due to an abnormal shutdown of the gsrvr connection. If this happens, the 'keepalive' setting of the operating system can help to remove the dead gsrvr process in order to help free up server resources.

For a dead gsrvr process to be removed, the ArcSDE configuration parameter called TCPKEEPALIVE must be enabled by setting its value to TRUE. This allows ArcSDE to check for dead gsrvr connections, based on the 'keepalive' interval settings of the operating system.

 WARNING: This article contains instructions to make specific changes to essential parts of your operating system. If these specific changes are not done correctly, it may cause serious problems to your computer operating system and files. First, ESRI recommends that you make a complete backup of your system, including the registry, before implementing any of the specific changes. It is highly recommended that you consult with your IT/MIS department, or other qualified computer systems professional before proceeding. ESRI cannot guarantee that you can solve problems that result from incorrect use of the Registry Editor utility. Use the Registry Editor utility at your own risk. Note: your operating system and any subsequent service packs may affect these instructions. These instructions are subject to change without notice.


 Please consult the operating system documentation for more information on making 'keepalive' setting changes.


Procedure

Instructions provided describe how to change the operating system's 'keepalive' settings.

  • On Microsoft Windows set KeepAliveTime to 300000.

    \HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters

    If the KeepAlivetime parameter does not already exist in the above location, create it. The time specified is in milliseconds.
    See link to a Microsoft TechNet article in the Related Information section below.
  • On Sun Solaris use the ndd command with the -set option to configure the tcp_keepalive_interval.

    # ndd -set /dev/tcp tcp_keepalive_interval 300000

    The time specified is in milliseconds.
  • On IBM AIX use the no command to set communication parameters.

    no -o tcp_keepidle=591

    The time specified is in halfseconds.
  • On HP HP-UX use

    ndd -set /dev/tcp tcp_time_wait_interval 300000

    The time specified is in milliseconds.
  • On RedHat Linux modify the following kernel parameter by editing the /etc/sysctl.conf file, and restart the network daemon (/etc/rc.d/init.d/network restart).

    # Decrease the time default value for tcp_keepalive_time
    
    tcp_keepalive_time = 1800


Related Information


Created: 6/18/2003
Last Modified: 6/12/2012

Article Rating: (1)
If you would like to post a comment, please login

Comments

By Underscore - 06/08/2012 10:52 AM

Other - See details below.

When adding the key to the Microsoft Windows registry, choose the DWORD option. When the dialog comes up, be sure to change the Base radio button to Decimal, else it will interpret your milliseconds as a Hexadecimal number--a number like 300,000 will be interpreted as 3,145,728 milliseconds.

Rating:

By Anonymous - 09/05/2007 2:13 PM

The article is incorrect or the solution didn’t work.

Please note that there is a bug in ArcSDE 9.2 that affects the solution in this article: #NIM010667 TCPKEEPALIVE parameter not cleaning orphaned connections.