-
Notifications
You must be signed in to change notification settings - Fork 303
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
Bunny Not Accepting Heartbeat of 0 #267
Comments
Any details on "fails to connect"? |
I get continual output like this:
|
And RabbitMQ log? |
I suspect this is Bunny't heartbeat thread going crazy about RabbitMQ not sending heartbeats but would be nice to see server log to clarify. |
My connection has the following settings: {
:heartbeat => 0,
:hosts => %w( po-sand-peter1 po-sand-peter2 po-sand-peter3 ),
:port => 5672,
:continuation_timeout => 5000,
:automatically_recover => true,
:network_recovery_interval => 1,
:recover_from_connection_close => true,
} RabbitMQ log:
|
OK, thank you, seems like my hypothesis is correct. Will get to it in the next day or two. |
Thanks! I'm going to be doing a bunch of resiliency testing in the next few days around publishing and subscribing when I specify multiple hosts. If you're overloaded with work I'm happy to spend some time looking into these issues and making pull requests on both bunny and march_hare. |
The issue turned out to be @transport.read_timeout = @heartbeat * 2.2 Having a read timeout of |
I am also having this same problem, even when setting heartbeat to a non-zero value.
|
Server Log:
|
2 is a really low value which may result in false positives on some networks. Certainly heartbeat value of 1 is known to trigger false positives on AWS. So please bump that to 10-20. |
Thanks @michaelklishin. '10' works! |
According to the Bunny docs (http://rubybunny.info/articles/connecting.html) the default value for
:heartbeat
is 0 (meaning no heartbeats will take place). I'm pretty sure this configuration used to work, but with recent versions of the gem if I set:heartbeat => 0
in my config hash, bunny fails to connect.The text was updated successfully, but these errors were encountered: