Configuring client-side TCP/IP keep-alives with EXTRA! to keep an idle host session connected

  • 7024214
  • 25-Oct-2019
  • 28-Oct-2019


EXTRA! X-treme version 9.4 and later


The TN3270 or TN5250 host or printer session (using Telnet or TLS), or any intermediate device between the server and the EXTRA! client, may be configured to terminate connections after a set amount of idle time.  This technical note explains how to enable and configure EXTRA! to send a keepalive signal to the server at a set interval, to maintain an active connection.


About the KeepAlive Parameter

The KeepAlive parameter enables the server or client to determine when a Telnet, TLS, or TCP/IP connection is no longer valid.  When a set amount of time elapses with no keep alive signal being received, the computer assumes that the connection has been terminated and that it may now reset the port or socket, making that resource available for further use.

A keepalive signal can be sent from the server or the client.

Server-initiated keepalive: EXTRA! X-treme supports TN3270 and TN5250 server-initiated keepalive, including outbound NOP (No OPeration) and Timing Mark commands from the server.

Server-initiated keepalive is useful if

  • You have sufficient rights to enable the server keepalive feature, and
  • There is a direct connection between the server and the client, with no intermediary devices, such as proxy servers or firewalls that may have their own keepalive timeout configurations.

Client-initiated keepalive: EXTRA! X-treme does not support outbound application level client-initiated keepalive (like the NOP or Timing Mark commands); however, it can be configured to support the Microsoft Windows TCP/IP level KeepAlive parameter.

Client-initiated keepalive is useful if

  • You are unable to configure server-side keepalive, or
  • There are intermediary devices, such as proxy servers or firewalls which may have their own keep alive timeout configurations.

Enabling Keepalive Support in EXTRA!

To enable client-initiated keepalive support, you must configure EXTRA! to use the Microsoft TCP/IP KeepAlive parameter. Follow these steps:

  1. Close any open EXTRA! host sessions.
  2. In a plain text editor, such as Notepad, open the EXTRA! session configuration or EDP file you are using for the TN3270 session. (To enable the KeepAlive parameter in all newly created TN3270 sessions, modify the 3270.EDP file.)

          By default, this file is located at C:\Program Files\Micro Focus\EXTRA!\Sessions\ENU\Template\3270.EDP.

  1. In your EDP file, scroll down to the [Connection] heading.
  2. Add the following line to the [Connections] section.

          Or, to disable this feature (the default), delete the line or change the value to FALSE.

  1. Save the file.
  2. Restart EXTRA!.

Configuring Microsoft TCP/IP KeepAlive Support

By default, when enabled by the application, the Microsoft TCP/IP KeepAlive parameter is configured to verify that a connection is still valid every two hours.  Depending on your network environment, you may need to reduce or increase this frequency interval.  The KeepAlive parameters are configured through the Windows Registry Editor.


  • Adjusting the following parameter may affect Windows TCP/IP-based applications besides EXTRA!.  Proceed with caution and test thoroughly before changing these values in a production environment.
  • You must have Administrative rights on the Windows workstation to adjust these parameters.
  • Proceed with extreme caution when editing the Windows registry.  It is critical to back up the registry before you proceed. For full details and warnings regarding editing the Windows registry, see Microsoft Article 322756:

The following parameter affect TCP/IP KeepAlive:


Controls how often TCP attempts to verify that an idle connection is still valid by sending a keep alive packet to the server and waiting for an acknowledgement.  The default is 7,200,000 (2 hours).  Decrease this value to verify and idle the connection more frequently.

To configure the TCP/IP KeepAlive parameter:
  1. Click Start > Run, in the Open field, enter regedit, and then click OK.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
  3. Right-click the Parameters folder, then click New > DWORD Value.
  4. Change the Name of the new key to "KeepAliveTime".
  5. Right-click the parameter, and click Modify.
  6. Enter the time value (in decimal) that is appropriate for your network environment in the Value data field.  Values are in thousands of a second (milliseconds), where 1000 = 1 second.
  7. Click OK.
  8. Exit the Registry Editor and restart your computer

Additional Information

Legacy KB ID

This article was originally published as Attachmate Technical Note 2353.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.