Skip to content

Conversation

@ebeigarts
Copy link
Contributor

This pull request fixes phased restart with worker shutdown timeout.

This is from our production stderr log:

.../bundle/ruby/2.1.0/gems/puma-2.10.2/lib/puma/cluster.rb:76:in `term': undefined method `[]' for nil:NilClass (NoMethodError)
from .../bundle/ruby/2.1.0/gems/puma-2.10.2/lib/puma/cluster.rb:169:in `check_workers'
from .../bundle/ruby/2.1.0/gems/puma-2.10.2/lib/puma/cluster.rb:408:in `run'
from .../bundle/ruby/2.1.0/gems/puma-2.10.2/lib/puma/cli.rb:507:in `run'
from .../bundle/ruby/2.1.0/gems/puma-2.10.2/bin/puma-wild:31:in `<main>'

This bug was introduced in 2.10 with #566

lib/puma/cluster.rb:76:

if @first_term_sent && (Time.new - @first_term_sent) > @options[:worker_shutdown_timeout]

The problem is that @options are not passed down to cluster workers.

I also changed Events class a bit, so that it doesn't throw everything
to STDOUT/STDERR when in cluster mode.

@tmikoss
Copy link

tmikoss commented Jan 15, 2015

+1

evanphx added a commit that referenced this pull request Jan 20, 2015
Fix phased restart with worker shutdown timeout
@evanphx evanphx merged commit 2bcd98c into puma:master Jan 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants