Unknown macro: {rate}
Table of Contents
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:
- KeepAliveInterval (may already exist); and
- KeepAliveTime
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. |
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.
To add these values perform the following steps:
- Click Start, then click Run, and then type regedit in the Open box.
- Locate the following registry sub-key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
- Highlight the Parameters sub-key.
- Create KeepAliveTime registry key as follows:
- Click on the Edit menu, then New > DWORD Value.
- Type the name of the new registry value (i.e. "KeepAliveTime").
- Right click on the new registry value and click 'Modify'.
- Set Base to Decimal.
- Set the value data to the desired value (i.e. '120000' - time in milliseconds).
- Click OK.
- Repeat for other Registry Value as follows:
- Click on the Edit menu, then New > DWORD Value.
- Type the name of the new registry value (i.e. "KeepAliveInterval").
- Right click on the new registry value and click 'Modify'.
- Set Base to Decimal.
- Set the value data to the desired value (i.e. '1000' - time in milliseconds).
- Click OK.
- Quit Registry Editor.
- 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.