puma: Error reached top of thread-pool: EOFError (EOFError)
Frequently for us in dev, puma hits an error in its thread pool, grinding the web server to a halt. This happens on page refreshes on our Rails app. I’m making an issue out of desperation, but I have not a lot to go on.
It appears this block catches some kind of internal error, but no backtrace is attached for us:
https://github.com/puma/puma/blob/master/lib/puma/thread_pool.rb#L121
begin
block.call(work, *extra)
rescue Exception => e
STDERR.puts "Error reached top of thread-pool: #{e.message} (#{e.class})"
end
After a few of those in the logs, we also sometimes see:
16:51:09 web.1 | Error in reactor loop escaped: undefined method
join’ for nil:NilClass (NoMethodError)`
Does anyone have a hunch about where this might be coming from?
System configuration
Ruby version: 2.5.0 Rails version: 5.1.4 Puma version: 3.11.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 18 (2 by maintainers)
I’m also seeing the same error reported by tuwukee on 3.11.4
Ruby 2.5.0 Rails 5.2.0
So I updated to 3.11.2 to fix this issue. While the issue log errors mentioned here no longer show up, I am now getting the following errors in the puma.log file with most HTTP requests (over SSL of course):
anyone have any idea what could be going on? I haven’t noticed any bad user experience yet (e.g. puma crash or http request hang)
Thanks, Rafael
Looks like the issue with
EOFError
is already fixed.The code version where the
EOFError
error was reported to happen - source code. Currently any IO error is rescued and swallowed here source code.This change was introduce in https://github.com/puma/puma/pull/1728 and released in v4.0.0 (Changelog)
Reopening until @tuwukee’s comment is addressed.