在server.log中报出如下错误:
显示为队列池容量问题,导致连接失败。
利用命令rabbitmqctl list_queues 查看队列信息,发现q_plugin队列中有150000条信息,别的队列都是空的,显然出问题了,应该是消息只进不出,原因在于消息队列堵塞,到底什么原因导致堵塞,不明确。
解决办法:写一个python脚本,把q_plugin队列中的所有消息取出,清空。
脚本代码:
import pika
connection=pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel=connection.channel()
channel.queue_declare(queue='q-plugin')
def callback(ch,method,properties,body):
print "Received %r" % (body,)
channel.basic_consume(callback,queue='q-plugin',no_ack=True)
channel.start_consuming()
说明:需要安装pika包