Skip to content
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

read_fully does not retry on IO::EAGAINWaitReadable (new in Ruby 2.1+) #456

Closed
mrchucho opened this issue Jan 16, 2017 · 0 comments
Closed

Comments

@mrchucho
Copy link

Hi, we keep seeing the following exception in our logs:

E, [2017-01-16T12:08:06.934348 #15759] ERROR -- : Resource temporarily unavailable - read would block (IO::EAGAINWaitReadable)
<internal:prelude>:76:in `__read_nonblock'
<internal:prelude>:76:in `read_nonblock'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/cruby/socket.rb:42:in `block in read_fully'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/cruby/socket.rb:41:in `loop'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/cruby/socket.rb:41:in `read_fully'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/transport.rb:214:in `read_fully'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/transport.rb:236:in `read_next_frame'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/reader_loop.rb:68:in `run_once'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/reader_loop.rb:35:in `block in run_loop'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/reader_loop.rb:32:in `loop'
/var/www/apps/platform-api-etl/shared/bundle/ruby/2.3.0/bundler/gems/bunny-8f0fc31cfab6/lib/bunny/reader_loop.rb:32:in `run_loop'

Based on this post I assumed that I just needed to add IO::EAGAINWaitReadable to the list of READ_RETRY_EXCEPTION_CLASSES. I tried that in a fork of this gem, but it had no effect.

We are running Ruby 2.3.

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Is this expected behavior or does it indicate a problem?

michaelklishin added a commit that referenced this issue Jan 16, 2017
Of course, they have no documentation but the idea is
probably the same as with the classic versions.

Fixes #456.
@michaelklishin michaelklishin changed the title IO::EAGAINWaitReadable ready_full does not retry on IO::EAGAINWaitReadable (new in Ruby 2.1+) Jan 16, 2017
@michaelklishin michaelklishin changed the title ready_full does not retry on IO::EAGAINWaitReadable (new in Ruby 2.1+) read_fully does not retry on IO::EAGAINWaitReadable (new in Ruby 2.1+) Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant