HOW TO

Change the operating system's 'keepalive' settings

Last Published: April 25, 2020

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:
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.


Note:
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.

    Code:
    \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.

    Code:
    # 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.

    Code:
    no -o tcp_keepidle=591

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

    Code:
    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).

    Code:
    # Decrease the time default value for tcp_keepalive_time
    tcp_keepalive_time = 1800

Article ID: 000006285

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options