RabbitMQ -使用中遇到的问题记录

一、遇到连接自动断开

报错 Connection reset by peer 解决办法

解决办法,

在py3:ConnectionParameters设置heartbeat_interval=0即可。

在py2:ConnectionParameters设置heartbeat=0即可。

py2中,例如: connection = pika.BlockingConnection(pika.ConnectionParameters(hosts[n], port, ‘/’, credentials, heartbeat=heartbeat))

You May Also Like

About the Author: daidai5771

发表评论

电子邮件地址不会被公开。 必填项已用*标注