3

在使用 pika for rabbitmq 的烧瓶应用程序中观察到以下错误,

使用 pika 1.1.0 版 rabbitmq 3.8.5 版

注意:配置的心跳值是 900(由于长时间运行操作设置了更高的值,所以我必须保持 pika 和 rabbitmq 之间的连接处于活动状态)

一段时间后发生连接丢失,我必须重新启动应用程序才能再次连接rabbitmq。有人可以指出我到底出了什么问题!

ERROR:pika.adapters.utils.io_services_utils:_AsyncBaseTransport._consume() failed, aborting connection: error=ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None); sock=<socket.socket fd=556, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 65083), raddr=('0.0.0.0', 5672)>; Caller's stack:
Traceback (most recent call last):
  File "pika\adapters\utils\io_services_utils.py", line 1041, in _on_socket_readable
  File "pika\adapters\utils\io_services_utils.py", line 791, in _consume
  File "pika\adapters\utils\io_services_utils.py", line 79, in retry_sigint_wrap
  File "pika\adapters\utils\io_services_utils.py", line 846, in _sigint_safe_recv
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Traceback (most recent call last):
  File "pika\adapters\utils\io_services_utils.py", line 1041, in _on_socket_readable
  File "pika\adapters\utils\io_services_utils.py", line 791, in _consume
  File "pika\adapters\utils\io_services_utils.py", line 79, in retry_sigint_wrap
  File "pika\adapters\utils\io_services_utils.py", line 846, in _sigint_safe_recv
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
ERROR:pika.adapters.base_connection:connection_lost: StreamLostError: ("Stream connection lost: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)",)
ERROR:pika.adapters.blocking_connection:Unexpected connection close detected: StreamLostError: ("Stream connection lost: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)",)
4

0 回答 0