Skip to content
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

Puma dies w/ Errno::ECHILD after coming back from sleep #1912

Closed
leonkielstra opened this issue Aug 16, 2019 · 3 comments
Closed

Puma dies w/ Errno::ECHILD after coming back from sleep #1912

leonkielstra opened this issue Aug 16, 2019 · 3 comments

Comments

@leonkielstra
Copy link

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

Steps to reproduce

  1. bundle exec puma -C config/puma.rb.
  2. Let Mac go to sleep en login again.

Expected behavior

Puma should still be running. Probably by restarting the timed out worker.

Actual behavior

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)>'

System configuration

Ruby version: 2.6.3
Rails version: 5.2.3
Puma version: 4.1.0
OS: MacOS

config/puma.rb

workers 1
port 8012
@nateberkopec nateberkopec changed the title Restart fails after timed out worker Puma dies w/ Errno::ECHILD after coming back from sleep Sep 10, 2019
@grantbdev
Copy link

I've observed this as well since upgrading.

System configuration

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.

@nateberkopec
Copy link
Member

Anyone see this on 4.1.1?

@grantbdev
Copy link

@nateberkopec I just tested with 4.1.1 and I did not receive the error. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants