Connection closed due to "CHANNEL_ERROR - second 'channel.open' seen" #4424
-
We are constantly getting this error |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I will convert this issue to a GitHub discussion. Currently GitHub will automatically close and lock the issue even though your question will be transferred and responded to elsewhere. This is to let you know that we do not intend to ignore this but this is how the current GitHub conversion mechanism makes it seem for the users :( |
Beta Was this translation helpful? Give feedback.
-
Nothing has changed around how channels are managed in 3.9, in fact, nothing has changed in over five years. This error means that you try to open a channel with the same number (ID) after it's been already open. This is not an issue You must be sharing a resource (such as a connection)( across threads, intentionally or not. We highly recommend against opening a channel for every message published as it absolutely ruins publishing throughput, does not help one bit with race conditions (or I cannot think of where it would be) and creates a high connection churn scenario. Opening channels all the time across threads can wreck chaos to the channel allocator on your connection, I cannot |
Beta Was this translation helpful? Give feedback.
-
Hi @michaelklishin Though I agree with everything which you've said and we're making those optimizations in our code but we're seeing a weird behaviour with respect to "second 'channel.open' see" errors. We're seeing these errors very frequently on RabbitMQ cluster which uses 3.9.11 but the same code if being used with the cluster which runs 3.8.5, doesn't receive such exceptions. What could have changed between 3.8.5 to 3.9.11 ? A stricter implementation of AMQP 0-9-1 perhaps? Or, is it because we haven't setup the cluster properly? what else could be the reason here? We need to know this because the stability of our rabbitmq workers is getting affected. We're introducing a channel-pool to reduce the channel churn (in a hope that above errors will get eliminated) - would this be sufficient or should we move back to RabbitMQ 3.8.5? |
Beta Was this translation helpful? Give feedback.
Nothing has changed around how channels are managed in 3.9, in fact, nothing has changed in over five years.
This error means that you try to open a channel with the same number (ID) after it's been already open. This is not an issue
in either RabbitMQ or the Java client (and Langhor does not manage channels in any way).
You must be sharing a resource (such as a connection)( across threads, intentionally or not.
We highly recommend against opening a channel for every message published as it absolutely ruins publishing throughput, does not help one bit with race conditions (or I cannot think of where it would be) and creates a high connection churn scenario.
Opening channels all the time a…