Compartilhar via


Explaining the TN3270 Idle Timeout setting

Questions about how the TN3270 Idle Time setting works have come up over the years, so I decided that I should provide some details to help clear up how the timeout actually works. Hopefully, it will help provide HIS Server Admins with additional knowledge that will allow the best setting to be chosen for their specific environments.

TN3270 Idle Timeout

The TN3270 Service supports an Idle timeout setting, which defaults to 120 minutes, or 2 hours. This setting causes the TN3270 Server to disconnect a TN3270 client session, which has been idle for 2 hours. When this occurs, the TN3270 Service will send a message to the TN3270 client and log Event 603 "TN3270 Service Error 503 Session terminated due to inactivity".

The TN3270 Idle Timeout is a configurable value that is available under the Settings tab of the TN3270 Service Properties as shown here.

image

 

The Idle Timeout can be set to a specific value or it can be set to Infinite. A setting of Infinite is useful for TN3270 sessions that are idle for long periods of time (e.g. TN3270 print sessions) but need to be available for use at all times. The caveat is that it is a global setting, so it will affect all TN3270 sessions configured on the TN3270 Service. The result is that some TN3270 users may be locked out of their host sessions because idle (or abnormally disconnected) sessions will never be cleaned up. You may need to have your mainframe personnel reset the LU from the mainframe side to allow the user to reconnect.

 

TN3270 Idle Timeout Operation

When the "Idle Timeout" is reached for a session (LU), the TN3270 Service checks to see if there has been any activity over that session in the previous "Idle timeout period" (by default 120 Minutes - 2 hours). If there has been any activity during this time, the connection is kept open. If not, the connection is terminated. For this reason, the Idle Timeout period can be anywhere from the configured Idle Timeout setting to 2 times (2x) the Idle Timeout setting.

Below are some examples of how the Idle Timeout feature works. The following three scenarios demonstrate what happens when a client connection is not normally terminated (i.e. hardware failure, Network Failure, TN3270 Emulator process terminated, etc.). These scenarios are based on an Idle Timeout setting of 20 minutes.

Scenario #1
If the TN3270 Service detects there was activity at 8:41 A.M. and the Idle Timeout timer expires at 9:00 AM, the connection would not be terminated (assuming a 20 minute idle timeout setting) and the timer would be reset. If there were no activity for the next 20 minutes, then the connection would be terminated. This means that in this scenario, the "real" timeout would be 39 minutes instead of 20 minutes.

Scenario #2
If the TN3270 Service detects there was activity at 8:40 A.M. and the Idle Timeout timer expires at 9:00 AM, the connection would be terminated (again assuming a 20 minute timeout setting). This means that in this scenario, the "real" timeout would be 20 minutes.

Scenario #3
If the TN3270 Server detects there was activity at 8:59 A.M. and the Idle Timeout timer expires at 9:00 AM, the connection would not be terminated (assuming a 20 minute timeout setting) and the timer would be reset. If there were no activity for the next 20 minutes, then the connection would be terminated. This means that in this scenario, the "real" timeout would be 21 minutes instead.

In summary, the amount of time it will take to "timeout" an idle session is determined by when the inactivity starts in relation to the Idle Timeout Timer. This can be up to 2 times the Idle Timeout setting.