The number of client channels increase over time and never decreases.
This occurs because the queue manager does not detect that the client has been disconnected, and therefore holds onto the transaction.
Resolving the problem
To ensure the queue manager detects when the client is no longer there, set a new property on the Channel Stanza named ClientIdle. This property is set to a value that is defined in seconds.
Use the following command:
amqmdain reg <qm_name> -c add -s Channels -v ClientIdle=<val_in_secs>
UNIX and iSeries
Set in the QM.ini file using a new stanza, as follows:
Note: On all operating systems, you must restart the queue manager for the parameter to take effect .
An explanation of the ClientIdle property from WebSphere MQ development:
A brief description of how the ClientIdle property works is in the case of a CLNTCONN/SVRCONN channel pair. If the client terminates due to a network connection problem, the queue manager fails to detect that the client has been disconnected and therefore holds onto the transaction. In this case the queue manager will wait for a transaction command (prepare,commit, etc.) from the client , but this will not happen because the client is no longer available.
In such situations the queue manager can be made aware of the orphaned connection by either setting the TCP KeepAlive in the qm.ini .This is a OS parameter and defaults to 2 hours .The SVRCONN will detect of failed client connection and will be cleaned the next time the KeepAlive is triggered.
The other solution to the above is to implement an 'undocumented' tuning parameter 'ClientIdle' under the Channels stanza in the qm.ini.
Client Idle Time Out provides a mechanism to allow system administrators to specify the equivalent of a disconnect(DISCINT) for SVRCONN channels. After the Client Idle period has elapsed without any
communication from the client, the server MCA will close the connection to the client.
Without Client Idle Time Out, there is no mechanism for 'timing out' SVRCONN connections which have not performed any activity for some time. Because of the nature of SVRCONN connections, a client which has disconnected without sending notification will also result in the SVRCONN MCA hanging for a long time(potentially with an associated uncommitted Unit of Work), until TCP/IP KeepAlive is triggered to free it up.
The ClientIdle parameter is available from version 5.3 onwards, so this feature will not be effective on 5.2 libraries.
Setting the ClientIdle to 10 minutes will cause the svrconn channel to remain active for 10 minutes, then close the connection if there is no activity from the client side during that 10 minute interval. The ClientIdle parameter will help in closing any orphaned or hung channel connections, and will not have a negative impact on performance.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.