Table of Contents
Unknown macro: {rate}

Table of Contents



Overview

If the situation arises that you get a user "stuck" in a connection between the client and the server you can use a Microsoft tool called KeepAlive to determine if a TCP/IP connection is lost. The KeepAlive will initiate the client to disconnect if the connection is inactive for a long period of time. You may find that by default, Windows will drop the inactive connection after about 2 hours, but with this KeepAlive setting you can configure that time.

This setting may be applied by adding the following values to the registry:

  1. KeepAliveInterval (may already exist); and
  2. KeepAliveTime
Icon

All the TCP/IP parameters are registry values that are located under one of two different subkeys of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services :

  • Tcpip\Parameters
  • Tcpip\Parameters\Interfaces\ ID for Adapter
KeepAliveInterval

Key

Tcpip\Parameters

Value Type

REG_DWORD - Time in milliseconds

Valid Range

1 - 0xFFFFFFFF

Default value

1000 (one second)

Description

This parameter determines the interval that separates keepalive retransmissions until a response is received.
After a response is received, KeepAliveTime again controls the delay until the next keepalive transmission.
The connection is aborted after the number of retransmissions that are specified by TcpMaxDataRetransmissions are unanswered.

KeepAliveTime

Key

Tcpip\Parameters

Value Type

REG_DWORD - Time in milliseconds

Valid Range

1 - 0xFFFFFFFF

Default value

7,200,000 (two hours)

Description

The parameter controls how frequently TCP tries to verify that an idle connection is still intact by sending a keepalive packet.
If the remote computer is still reachable and functioning, the remote computer acknowledges the keepalive transmission.
By default, keepalive packets are not sent. A program can turn on this feature on a connection.



Setting these values should allow the server to self-correct when a loss of connection occurs. You can set the timing to whatever you would like, as this has no impact on the functionality of the software however it will increase the traffic on the network and this should be taken into account.


Method

Caution

Icon

This method does involve changes to the registry on the server and you should be aware of these types of changes.


To add these values perform the following steps:

  1. Click Start, then click Run, and then type regedit in the Open box.
  2. Locate the following registry sub-key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
  3. Highlight the Parameters sub-key.
  4. Create KeepAliveTime registry key as follows:
    1. Click on the Edit menu, then New > DWORD Value.
    2. Type the name of the new registry value (i.e. "KeepAliveTime").
    3. Right click on the new registry value and click 'Modify'.
    4. Set Base to Decimal.
    5. Set the value data to the desired value (i.e. '120000' - time in milliseconds).
    6. Click OK.
  5. Repeat for other Registry Value as follows:
    1. Click on the Edit menu, then New > DWORD Value.
    2. Type the name of the new registry value (i.e. "KeepAliveInterval").
    3. Right click on the new registry value and click 'Modify'.
    4. Set Base to Decimal.
    5. Set the value data to the desired value (i.e. '1000' - time in milliseconds).
    6. Click OK.
  6. Quit Registry Editor.
  7. Restart the computer to make the change take effect.

Or you can download the Registry file here on to the server PC, right click on the registry file then click Merge. Restart the computer to make the change take effect.