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
idle-timeout not shutting down when workers
are set
#3228
Comments
Tagging related PR for |
😓 That totally makes sense. What's the desired behavior here? Let's say you have a cluster mode puma with 4 workers. After 5 seconds of inactivity, should the master kill everything and shut itself down? |
Well, I expected Puma to completely shut itself down when using this feature. Though perhaps if combined with some new flag such as |
My bad, I didn't consider cluster mode. I've got a failing test to pass with a very rough but not ideal solution. I'll get a PR up as soon as I can. There's already the implementation to gracefully shut down all workers and finally the master process, which we can use if a single worker times out. The tricky part is sending a signal to the master process from the server, which is where the timeout was implemented. Update: Got this up with a better solution than what I started with. |
Expected
Puma to shut down after 5 seconds of inactivity.
Actual
Puma restarts workers infinitely.
Puma config:
Default Puma config when initializing a Rails app.
To Reproduce
hello.ru
file:Run it with:
Notes
I initially thought this was because of Scout APM's Puma worker loop, because I was seeing this when also enabling
preload_app
and usingscout_apm
: (on a new Rails app, which you can clone here):However, looks like Scout APM will detect when shutting down, so the real culprit is the
workers
option not allowing Puma to shut down.Versions
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: