Number of client channels increasing
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
NOTE: ClientIdle is not supported on WebSphere MQ v7.1.x.x or higher because the DISCINT interval should be used on the SVRCONN channel.
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 to version 7.0, so this feature will not be effective on 5.2 libraries or on 7.1 or later 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. If not configured properly using this setting may results in AMQ9213. See the following link for more information: AMQ9213 2009 MQRC_CONNECTION_BROKEN on MQ clients
More support for:
Channels LU62 / TCP
Software version: 6.0, 7.0, 7.0.1
Operating system(s): AIX, HP-UX, IBM i, Linux, Solaris, VSE, Windows, z/OS
Reference #: 1376219
Modified date: 2014-05-30