-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Error in reactor loop escaped: mode not supported for this object: r (ArgumentError) #2060
Comments
I'm guessing you get this right when it starts up, right? |
Or maybe after serving the first request? |
It doesn't happen straight away or on the very first request. It only seems to happen after holding down refresh in the browser to trigger a few concurrent requests. Once the error appears in the puma log the page that I was refreshing stops responding |
@ioquatix Have you seen this before? (Also are you ok with me mentioning you on anything possibly nio4r related?) |
There are various bugs with JRuby, yes I've seen this one but I don't know why it's happening. I've been discussing it with @headius but honestly it's a bit outside what I'm currently focusing on. I welcome any PRs to fix this issue in nio4r, and investigation/discussion as to why it's happening. |
It didn't happen with puma 3.12.1 so we're reverting back to that. I'll check to see if this was introduced on a specific version of 4.x and I'll try to create a minimal example app to reproduce the error. |
If this is a commercial project, you are welcome to sponsor my open source efforts to prioritise this issue. If you can create a minimal repro, that is most useful, but it shouldn't need to involve puma, it's a socket level issue with JRuby and nio4r. |
Thanks for confirming this is probably a nio4r thing, I’ll close here. |
This is most likely due to socketry/nio4r#67 as noted in jruby/jruby#2750 |
An attempted fix for this issue was merged in #2477 . I ran a load test on puma v5.1.1 using unix:// sockets with a jRuby Rails app and puma was able to sustain many parallel connections for some minutes but eventually it did stop responding completely with no error in the logs. I ran the same load test using tcp:// sockets with the same jRuby Rails app and couldn't get it to lock up so it looks like tcp:// sockets are the way to go for jRuby apps. |
@jboler That hang might indicate a bug in our UNIXSocket implementation. Can you show me how to reproduce it and file a JRuby issue? |
@headius I will try to reproduce it with a minimal jRuby Rails repo because I can't publish the Rails app I used. I think it unlikely that the bug is in the jRuby UNIXSocket implementation because we've been using unix:// sockets with our jRuby Rails app + puma 3.x for years without issue. I believe the problem is with nio4r which was introduced in puma 4.x. |
Do you recall approx how many connections before the failure? I may be able to try to repo... |
I was running puma with min_threads & max_threads set to 8 on jRuby 9.2.13.0. For requests I opened ~15 terminals and ran:
It took a few minutes to lock up. I could imagine that increasing the load might trigger it more quickly. The puma app is being proxied by nginx with this config: /etc/nginx/nginx.conf
/etc/nginx/sites-enabled/host.conf
|
I did see a similar error reported here but the error message is slightly different.
Describe the bug
Rails 5.2.3
jRuby 9.2.7.0 (OpenJDK 8)
puma (4.2.1-java)
nio4r (2.5.2-java)
Ubuntu 16.04
Seeing this error:
Puma config:
The text was updated successfully, but these errors were encountered: