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
Sidekiq::ProcessSet#quiet! causes JRuby process exit #2063
Comments
I don't think you're missing anything. We probably shouldn't be using signals to implement that. |
Cool, maybe I'll take a crack at putting together a PR this weekend. |
Please use -Xrs when running on JRuby if you need to use USR1. |
Oy, -Xrs doesn't make USR1 available according to http://www.oracle.com/technetwork/java/javase/signals-139944.html#gbzbl |
I started on this and the code got really ugly really fast so I wanted to try an alternative approach but was busy with holiday stuff. Sorry, still plan to take a crack at it! And yeah, I went through that line of thinking as well.. Also, sending a USR1 works in Apple's JVM but not Oracle's, so there's that. (edit: FWIW, it gets ugly because you want to invoke USR1/USR2 actions directly but probably still Process#kill anything else, and USR2 doesn't even work on JRuby right now [#1653]) |
Handle SIGUSR1 and SIGUSR2 as special cases so Sidekiq API works in JRuby. Fixes #2063
Using latest Sidekiq (Pro) on JRuby 1.7.16, quieting via the API causes the process to exit with a terse message and nothing in the logs:
I thought the API was designed for cases like JRuby where USR1 won't work, but the Sidekiq heartbeat method looks like it pops a signal out of Redis and then does a Process.kill [1]. That's the same IPC I'd expect not to work on JRuby, no?
Or maybe I'm missing something? Please advise, thanks!
[1] https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/manager.rb#L162
The text was updated successfully, but these errors were encountered: