StarQuest Technical Documents

Configuring TCP KeepAlive Parameters

Last Update: 12 November 2021
Product: SQDR, StarSQL, StarLicense for Windows/UNIX
Article ID: SQV00SL002

Abstract

The StarLicense server uses the settings for the TCP KeepAlive parameter to clean up connections from clients that have disconnected without releasing a license that has been checked out. You can change the TCP KeepAlive parameter if you need the abandoned license checkouts to be cleaned up more frequently.

The TCP KeepAlive parameter can also be used to improve handling of connectivity issues in other applications such as SQDR.

Solution

The StarLicense server uses the system TCP/IP KeepAlive parameter settings to clean up connections from clients that have disconnected from the network without releasing the StarQuest product license that was checked out by the computer. The default values for the KeepAlive parameter should be sufficient for most users, but you can change them if necessary, such as to clean up abandoned license connections more frequently. The KeepAlive parameter names vary by operating system but generally specify:

  • the interval to wait before probing the idle connection (on most platforms the default is 2 hours)
  • the interval to wait before retrying the probe after an initial failure to respond
  • the maximum number of times to retry the probe

Modifying the KeepAlive parameter settings may affect the operation of other applications on the computer. You also may want to set additional TCP/IP parameters that affect TCP connections, depending on the overall impact to other TCP/IP parameters after you modify the KeepAlive settings.

The method of changing the KeepAlive parameter settings varies by operating system, so refer to your system documentation for details. This technical document describes the general steps for displaying and modifying the KeepAlive parameter for the platforms on which the StarLicense server is supported.

The following table shows the names of the KeepAlive parameters for each supported operating system.

Table 1: KeepAlive Parameters by Operating System

 

Displaying and Modifying KeepAlive Values

Follow these steps to modify the values.

  1. Log in as root on a UNIX-based computer or as an Administrator on a Windows computer.
  2. Refer to the information for the operating system you are using, as suggested in the following table, to display information about the network tuning parameters.
Platform Operating System Command
AIX no -a
Linux sysctl -h
Windows Refer to http://technet.microsoft.com/en-us/library/bb726981.aspx#EDAA
  1. Display the current KeepAlive settings, replacing <tcp_parameter> with the names shown in Table 1 for each platform.
Platform Operating System Command
AIX no -o<tcp_parameter>
Linux sysctl net.ipv4.<tcp_parameter>
Windows From the Start menu, choose Run and enter regedit to view the parameter located in the Registry file HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
  1. Display the range of available settings.
Platform Operating System Command
AIX This option is not available.
Linux This option is not available.
Windows Refer to http://technet.microsoft.com/en-us/library/bb726981.aspx#EDAA.
  1. Modify the KeepAlive values as desired.
Platform Operating System Command
AIX no -o <tcp_parameter>= <tcp _value>
Linux To set the value temporarily until the computer is restarted:
sysctl -w net.ipv4.<tcp_parameter> = <tcp_value>

To make the change permanently:
Update /etc/sysctl.conf with net.ipv4.<tcp_parameter> = <tcp_value> and issue one of the following commands, depending on which version of Linux you are running:

Red Hat: chkconfig sysctl on

SUSE: chkconfig boot.sysctl on

Windows Run regedit to edit the Windows Registry key located in the path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters.

After you change the Registry value you must restart the computer for the change to take affect.


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.