-
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
Empty header response received from the server #175
Comments
Please upgrade to |
Another reason can be that Hutch uses an unreasonably low heartbeat interval (1 second, which means peers exchange heartbeat frames roughly every I don't know if there is a way to force Hutch to not use such a low value. If there's no, there should be. |
You can catch the exception if you disable automatic recovery. Otherwise it is raised and handled in the I/O thread. When disabled, any I/O reader loop exceptions will be re-raised in the thread connection was created on. If Hutch consumers are long running but cannot benefit from Bunny's network failure recovery, I consider it to be a massive issue in Hutch. |
After Hutch-Bunny upgradeI've upgraded to Hutch-0.6.0 with hutch.gemspec containing the Bunny runtime dependency ~> 1.0.0 and I'm still getting the following exception. Note: This is happening on our Heroku staging environment deploys with a dyno having 512MB of total memory each. Exception and stack trace 2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: Exception in the reader loop: AMQ::Protocol::EmptyResponseError: Empty response received from the server.
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: Backtrace:
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/amq-protocol-1.8.0/lib/amq/protocol/frame.rb:60:in `decode_header'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/bunny-1.0.0/lib/bunny/transport.rb:205:in `read_next_frame'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/bunny-1.0.0/lib/bunny/reader_loop.rb:63:in `run_once'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/bunny-1.0.0/lib/bunny/reader_loop.rb:33:in `block in run_loop'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/bunny-1.0.0/lib/bunny/reader_loop.rb:30:in `loop'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: /app/vendor/bundle/ruby/1.9.1/gems/bunny-1.0.0/lib/bunny/reader_loop.rb:30:in `run_loop'
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: Recovering from a network failure...
2013-11-25T22:18:00.124697+00:00 app[hutch_worker.1]: 2013-11-25T22:17:57Z 2 INFO -- hutch shut down gracefully RabbitMQ logs to follow... |
Yes, hutch uses a 1 second heartbeat, https://github.com/gocardless/hutch/blob/v0.5.1/lib/hutch/broker.rb#L48 Discussed here ruby-amqp/hutch#56 I think this issue can be closed. |
FTR, Hutch master now uses heartbeat interval of 30 by default. |
@michaelklishin @carlhoerberg This fixed the original problem, thanks so much!! |
When using Hutch 0.5.1 for the consumer and message publisher, I'm getting an empty response error exception with Bunny when one of our consumers processes very large files (see below), and I am unable to catch this exception. The message is no more than 255 characters, but the csv files (>7k entries) processed and stored in the consumer are on the order of megabytes large, so the consumer takes a bit of CPU time and memory.
These are symptoms of the underlying problem, and I'd like to ask for any other reason on what could be happening in Bunny given the info below and how I could mitigate this issue (unable to catch exception).
I've taken a look at related issues with fixes here:
#115
#138
#74
The version of Bunny I'm using (>=0.10.8) should have fixes for issue 74, and 115.
Gemfile.lock
hutch (0.5.1)
bunny (>= 0.10.8)
carrot-top (
> 0.0.7)> 1.5)multi_json (
Consumer pseudocode
Exception and stacktrace
The text was updated successfully, but these errors were encountered: