Troubleshooting a DataGate Job that is Not Terminating
If you notice that a DataGate Job is still running after a client connection
is lost, this is due to a TCP/IP feature called "Keep-Alive". Refer to the following to change the system's default Keep-Alive value.
When the database connection is TCP/IP, the server machine utilizes a TCP/IP
feature called "Keep-Alive". Keep-Alive packets are used to probe a connection that has been inactive
for a long time. The server initiates a disconnect when the probes do not get
through. This means that if the client connection is lost for a prescribed
length of time, the server sends a disconnect message to its server job (usually
the result of a system crash or power-down).
The default Keep-Alive setting for Windows NT and AS/400 is two hours, meaning that an Acceler8DB thread or DataGate job would remain active for 2
hours after connection was lost with the client. The 2-hour default may be an
unsatisfactory period of time for you, as files would continue to remain open, etc. on an
abnormal disconnection until the Keep-Alive time had elapsed.
Refer to the following to modify the server machines' respective Keep-Alive
period.
AS/400
- Request the Configure TCP/IP menu by executing the command: cfgtcp
-
Select menu item 3 - Change TCP/IP Attributes.
-
Set TCP/IP Keep-Alive to the number of minutes desired. (Note: 2 to 5 minutes should work well in most cases).
Windows NT 4.0
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems
that may require you to reinstall Windows NT to correct them. Microsoft cannot
guarantee that any problems resulting from the use of Registry Editor can be
solved. Use this tool at your own risk. The following was derived from Article ID
Q120642.
To change these parameters, use the following procedure:
- Run Registry Editor (REGEDT32.EXE).
-
From the HKEY_LOCAL_MACHINE subtree, go to the following key:
\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- The Value is "KeepAliveTime".
If present (usually not), double click on it to edit in milliseconds as noted
below. Otherwise, continue with Step 4.
-
Select "Edit -> Add Value".
-
For Value name, enter KeepAliveTime.
-
From the Data Type drop down list, select REG_DWORD.
-
Press OK.
-
In the DWORD Editor dialog, enter the number of milliseconds. Select the
Radix Decimal option.
-
Select OK.
-
Enter the Keep-Alive value in milliseconds; eg.g, 5 minutes = 300000 msec.
- Valid Range: 1 - 0xFFFFFFFF
- Default: 7,200,000 (two hours)
The parameter controls how often TCP attempts to verify that an idle
connection is still intact by sending a Keep-Alive packet. If the remote system is still
reachable and functioning, it will acknowledge the Keep-Alive transmission.
Keep-Alive packets are not sent by default. This feature may be enabled on a
connection by an application.
-
After typing in the value, use the "Data Type" checkbox to set the value type.
Select OK.
Exit the Registry Editor.
Reboot the system to make the change take effect.