很久没碰MQ了,现在一个QM上创建的队列很多,很怕出现问题,今天果然出现了,做下记录备忘。
一、现象及日志分析
mq客户端无法读写消息,提示:MQJE001:发生 MQException:完成码 2,原因码 2009
查看/var/mqm/qmgrs/QMxxxx/errors/AMQERR01.LOG报错如下:
----- amqrmrsa.c : 565 --------------------------------------------------------
03/28/2013 10:07:23 AM - Process(6130.6034) User(mqm) Program(amqrmppa)
Host(xxxx)
AMQ9513: Maximum number of channels reached.
EXPLANATION:
The maximum number of channels that can be in use simultaneously has been
reached. The number of permitted channels is a configurable parameter in the
queue manager configuration file.
ACTION:
Wait for some of the operating channels to close. Retry the operation when some
channels are available.
二、问题诊断和处理过程
日志中描述很清楚,maximum number of channels ...reached。据此查阅官方文档,调整参数、重启QM即可。
1、修改问题发生的特定QM的qm.ini的MaxChannels参数,默认是100可能不够。可以修改通道连接数来提高并发。具体需根据实际情况而定。我设定的就很高,因为读写mq的java客户端是分地区多线程的。
在qm.ini中加入或修改该节:
CHANNELS:
MaxChannels = 20 ; Maximum number of channels allowed.
; Default is 100.
MaxActiveChannels = 10 ; Maximum number of channels allowed to be
; active at any time. The default is the
; value of MaxChannels.
2、重启QM。最好重启QM前先将连接的各种客户端程序通知停止。
endmqm QM
strmqm QM
添加新评论1 条评论
2013-05-10 16:49