Since I've upgraded puma to 4.1.0 it stops the webserver every time my machine goes to sleep. The worker times out and then it fails to restart/start the worker.
I tried to figure out what happens exactly, but I don't fully understand what it's doing. I do think that this is introduced with PR #1887
1) bundle exec puma -C config/puma.rb.
2) Let Mac go to sleep en login again.
Puma should still be running. Probably by restarting the timed out worker.
Fails to restart worker.
[6170] ! Terminating timed out worker: 6243
bundler: failed to load command: puma (/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/bin/puma)
Errno::ECHILD: No child processes
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/lib/puma/cluster.rb:231:in `waitpid'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/lib/puma/cluster.rb:231:in `check_workers'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/lib/puma/cluster.rb:513:in `run'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/lib/puma/launcher.rb:188:in `run'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/lib/puma/cli.rb:80:in `run'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/gems/puma-4.1.0/bin/puma:10:in `<top (required)>'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/bin/puma:23:in `load'
/Users/leon.kielstra/.rvm/gems/ruby-2.6.3/bin/puma:23:in `<top (required)>'
Ruby version: 2.6.3
Rails version: 5.2.3
Puma version: 4.1.0
OS: MacOS
config/puma.rb
workers 1
port 8012
I've observed this as well since upgrading.
Ruby version: 2.5.3
Rails version: 5.2.3
Puma version: 4.1.0
OS: MacOS (10.14.6)
config/puma.rb
workers 1
threads 2, 8
To reproduce, I put the Mac in full sleep and awake it and log in. Testing just now, I see Errno::ECHILD: No child processes on 4.1.0, but the web server stays alive on 4.0.1. Hope that helps, let me know if I can provide more information.
Anyone see this on 4.1.1?
@nateberkopec I just tested with 4.1.1 and I did not receive the error. Thanks!
Most helpful comment
@nateberkopec I just tested with 4.1.1 and I did not receive the error. Thanks!