aio-pika icon indicating copy to clipboard operation
aio-pika copied to clipboard

`Channel closed` publishing errors are raised after reconnection with restarted rabbitmq instance in versions > `8.2.3`

Open ancalita opened this issue 1 year ago • 3 comments

In versions above 8.2.3 (starting with 8.2.4), whenever the RabbitMQ server is restarted and the publisher (in this case an instance of Rasa assistant) attempts to publish new messages, we've encountered publishing failures due to e.g. '<Channel: "1" at 0x1382a4a40> closed errors. This can be reproduced with 8.2.4 and 8.3.0 too. I have not tried with 9.0.x (currently the aio-pika dependency is pinned <9.0.0 in rasa). This kind of error is not encountered after restarts with version 8.2.3 for example.

ancalita avatar Mar 28 '23 12:03 ancalita

@ancalita The problem was at the intersection of aiormq and aio_pika, and was almost completely fixed in branch 9. Backporting this to branch 8, I don't have the resources, sorry. The best recommendation I can give you is to migrate to version 9.

mosquito avatar Mar 28 '23 12:03 mosquito

@mosquito Thanks! Temporarily we've pinned to 8.2.3 until we have the bandwidth to upgrade to the new major version and resolve any breaking changes. Which version 9.x specifically contains the fix to this restart bug?

ancalita avatar Mar 30 '23 10:03 ancalita

@ancalita the 9.0.5 is really better with it. But the latest bulk of fixes in #533

mosquito avatar Mar 30 '23 10:03 mosquito