Timing out idle active threads

You can specify a time limit for active threads to remain idle.

About this task

When a thread remains idle than the specified limit, DB2® might cancel the thread. However, pooled and in-doubt threads are not canceled.

Procedure

To specify limits for active idle threads:

  • Set the value of the IDTHTOIN subsystem parameter. The timeout period is an approximation. If a server thread has been waiting for a request from the requesting site for this period of time, it is canceled unless the thread is currently pooled or in doubt thread. A value of 0, the default, means that the server threads cannot be canceled because of an idle thread timeout. You can specify a value from 0 to 9999 seconds.
  • Set the value of the CMTSTAT subsystem parameter to ACTIVE. When you specify ACTIVE, as application must start its next unit of work within the specified timeout period, otherwise its thread is canceled.
  • Set a value for the TCPKPALVsubsystem parameter. A TCP/IP keep alive interval of 5 minutes or less, in conjunction with an IDTHTOIN value, can ensure that resources are not locked for a long time when a network outage occurs.