Comments (7)
Carl,
Your understanding is correct: this suggests a TCP connection failure which Bunny 0.9 does not detect yet. This is the next big thing I am going to work on.
from bunny.
Using heartbeats should help. Can you be using load balancers/proxies by any chance? Those may be closing connections they consider idle. Bunny 0.9 should set SO_KEEPALIVE
on the socket it uses.
from bunny.
do you want me to test with a LB or are you asking if i used one when i got this error? yes and no..
from bunny.
Some observations on a long-running Bunny/RabbitMQ connection in irb that you may be interested in -
- Bunny 0.9 does not seem to set keepalive on a socket by default, however, you can explicitly set it with Bunny.new(:keepalive => true)
- RabbitMQ 3.0.0 has a default heartbeat interval of 600 secs. After using Wireshark, the server did indeed send heartbeats to the client and kills the connection some time after 2 heartbeats have been sent without reply. This results in the loop described above.
- Bunny::Session#negotiate_value method doesn't allow the heartbeat interval to be set to 0 if the server setting is > 0. Looking at the AMQP 0.9.1 spec (http://www.rabbitmq.com/amqp-0-9-1-reference.html), I think that Bunny should allow the heartbeat interval to be set to 0 regardless of the server setting.
from bunny.
Similar thing happens when a connection is forcefully closed:
NoMethodError
undefined method `read_fully' for nil:NilClass
/Users/carl/.rvm/gems/ruby-1.9.3-p194/gems/bunny-0.9.0.pre3/lib/bunny/transport.rb:109:in `read_next_frame'
/Users/carl/.rvm/gems/ruby-1.9.3-p194/gems/bunny-0.9.0.pre3/lib/bunny/main_loop.rb:26:in `block in run_loop'
/Users/carl/.rvm/gems/ruby-1.9.3-p194/gems/bunny-0.9.0.pre3/lib/bunny/main_loop.rb:22:in `loop'
/Users/carl/.rvm/gems/ruby-1.9.3-p194/gems/bunny-0.9.0.pre3/lib/bunny/main_loop.rb:22:in `run_loop'
from bunny.
I agree with that we probably should allow setting heartbeats to 0. I will look into that tomorrow. And we should make :keepalive => true
the default, it makes much more sense that way.
from bunny.
Done, 0.9.0.pre6
includes this feature.
from bunny.
Related Issues (20)
- Gem includes test certificates HOT 3
- Cannot subscribe to existing queue with no configure permission HOT 2
- Redeliver publisher confirms acks again and again from 0 till current tag HOT 4
- Binding a queue to same exchange twice but using different routing keys not working as expected HOT 1
- any plans to support the new rabbitMQ stream plugin with RabbitMQ 3.9? HOT 4
- Queue subscribe: Calling thread is no longer blocked after connection failure HOT 2
- TLS 1.3 support HOT 2
- QueueDeclare / Timeout issue
- Bunny does not recover from Rabbitmq Broker restart but reconnects on manual restart of service
- Confusion of parameters
- NameError: uninitialized constant OpenSSL::SSL::TLS1_3_VERSION (bunny-2.20.0, ruby 2.6) HOT 4
- Bunny::Channel#quorum_queue does not result in a QQ declaration
- Conditionally alias constants for TLSv1.3 to support older OpenSSL releases
- OpenSSL error is causing unrecoverable issue HOT 1
- Bunny::Channel#default_exchange returns a new object each time
- Missing client notification when recovery fails (after specified recovery attempts) HOT 1
- Reader Loop: undefined method handle_frameset for nil:NilClass
- Heartbeat sender uses Time.now which is unreliable HOT 6
- Channel callback from delivery acknowledgement timeout.
- `basic_cancel` makes other channels wait
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bunny.