MQ Disconnection after inactivity (Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN))
search cancel

MQ Disconnection after inactivity (Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN))

book

Article ID: 213316

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

 

The error occur when utilizing performance MQ virtual service, and after a long period of inactivity the virtual service's next call will always result in a timeout error (Error log attached). After a couple of failed calls, the connection will reestablish and work again. I believe the connection is closes on the other side due to inactivity, but the SV still use the stale connection. Is there a way to ensure all connection is fresh? 

Attempted solutions:

- Add timeout in the listener

- Increase Capacity 

- Using the ReplyTo queue

 

Error log included: 

============================================================================
| Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
============================================================================
| Step:        Respond
----------------------------------------------------------------------------
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
----------------------------------------------------------------------------
| Trapped Exception: Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
| Trapped Message:   

============================================================================
| Exception: 
============================================================================
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
----------------------------------------------------------------------------
| Trapped Exception: Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
| Trapped Message:   

============================================================================
| Exception: 
============================================================================
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2009 (MQRC_CONNECTION_BROKEN)
----------------------------------------------------------------------------
| Trapped Exception: MQJE001: Completion Code '2', Reason '2009'.
| Trapped Message:   com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2009'.
----------------------------------------------------------------------------

Environment

All supported DevTest releases.

Cause

MQ Server configuration.

The MBCCA.VIRT.TO.HOST queue has a Heartbeat interval set to 300.  The Disconnect interval is set to 300.  As per IBM MQ documentation, the Heartbeat interval should always be set to a value less than the Disconnect interval.  By default the Disconnect interval is set to 0, so this was changed at one time on this queue.

Resolution

Changing the Heartbeat interval to 30 on queue MBCCA.VIRT.TO.HOST will resolve this issue.