Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue recreating connection to a queue after a connection problem #632

Open
dd185209 opened this issue Jun 11, 2024 · 1 comment
Open

Issue recreating connection to a queue after a connection problem #632

dd185209 opened this issue Jun 11, 2024 · 1 comment

Comments

@dd185209
Copy link

dd185209 commented Jun 11, 2024

Hi my application is using aio-pika=9.4.1 to connect to a rabbitmq. I'm testing under docker environment and if I manually shutdown rabbit I see following log messages:

Unexpected connection close from remote "amqp://user:******@localhost:5672", Connection.Close(reply_code=320, reply_text="CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'")
NoneType: None
Connection attempt to "amqp://user:******@localhost" failed: Server connection unexpectedly closed. Read 0 bytes but 1 bytes expected. Reconnecting after 5 seconds.
Connection attempt to "amqp://user:******@localhost" failed: [WinError 1225] The remote computer refused the network connection. Reconnecting after 5 seconds.
Connection attempt to "amqp://user:******@localhost" failed: [WinError 1225] The remote computer refused the network connection. Reconnecting after 5 seconds.
Connection attempt to "amqp://user:******@localhost" failed: [WinError 1225] The remote computer refused the network connection. Reconnecting after 5 seconds.

but when rabbit restarts I see following errors:

Connection attempt to "amqp://user:******@localhost" failed: Server connection unexpectedly closed. Read 0 bytes but 1 bytes expected. Reconnecting after 5 seconds.
Connection attempt to "amqp://user:******@localhost" failed: Server connection unexpectedly closed. Read 0 bytes but 1 bytes expected. Reconnecting after 5 seconds.

then the application is successfully connecting to new instance (no more error where logged) but it's not true for the exchange and queue (there is no consumer).
The application is now blocked whiting for new messages that never be read.

Using aio-pika==8.2.1 the application were working fine, I got similar error when the rabbitmq is down, but when it comes up again even the consumer is connected and messages are processed correctly.

@Darsstar
Copy link
Contributor

This could be a duplicate of #594.

How certain are you that there is a strong reference chain to the Channel or Queue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants