-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
USR2 restart kills master / worker processes with prune_bundler option #550
Comments
Im also having this issue in production. Looks like it's a serious issue. When I running pumactl command like this
Then puma fails to load. |
But when using phased-restart I dont see the Bundle error.
|
Joining the party with a similar problem. With and without
split' for nil:NilClass (NoMethodError)
Using Edit: This was using Puma 2.8.2. When using Puma from master I get the same error message as @fred. |
This should be fixed in |
Great, thanks @evanphx . Not seeing this issue with |
thanks for the fix, working great now. |
I would like to reopen this as I still get an error with env = 'alpha'
user = 'user'
project = 'project'
environment env
daemonize
pidfile "/home/#{user}/applications/#{project}/#{env}/shared/puma.pid"
state_path "/home/#{user}/applications/#{project}/#{env}/shared/puma.state"
workers 4
threads 2,4
bind "unix:///home/#{user}/applications/#{project}/#{env}/shared/puma.sock"
prune_bundler
stdout_redirect "/home/#{user}/applications/#{project}/#{env}/shared/log/puma_stdout.log", "/home/#{user}/applications/#{project}/#{env}/shared/log/puma_stderr.log", true When I issue a restart command using
This might not get a reopen, will open a fresh issue. :) |
We're seeing the same exact thing on 2.9.1 still. If we remove @tbuehlmann did you ever get a resolution on this? |
I guess the |
@bmorton How are you starting puma? |
We're using upstart to bring it up/down and sending USR2 to hot restart. Here's the config for that: https://gist.github.com/bmorton/adb2488cca9a62db61c9 |
@bmorton I found the bug and just released 2.9.2 with the fix. Could you try it out and see if everything looks ok? |
Oh sweet, thanks for the quick turnaround! I'll give it a go and report back. |
Looks like that fixes it... thanks again! 👍 |
Looks okay for me, too. 💛 |
We're seeing the same exact thing on 2.9.2 still. If we remove prune_bundler, things work fine. environment
that's my project https://github.com/xiaoronglv/searchapp cd /home/webapp/www/searchapp/current && ( RACK_ENV=production ~/.rvm/bin/rvm 2.2.0 do bundle exec puma -C /home/webapp/www/searchapp/shared/puma.rb --daemon )
* Pruning Bundler environment
/home/webapp/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'rack' (= 1.6.4) among 15 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/webapp/.rvm/gems/ruby-2.2.0:/home/webapp/.rvm/gems/ruby-2.2.0@global', execute `gem env` for more information
from /home/webapp/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /home/webapp/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /home/webapp/www/searchapp/shared/bundle/ruby/2.2.0/gems/puma-2.9.2/bin/puma-wild:20:in `block in <main>'
from /home/webapp/www/searchapp/shared/bundle/ruby/2.2.0/gems/puma-2.9.2/bin/puma-wild:18:in `each'
from /home/webapp/www/searchapp/shared/bundle/ruby/2.2.0/gems/puma-2.9.2/bin/puma-wild:18:in `<main>' #!/usr/bin/env puma
directory '/home/webapp/www/searchapp/current'
rackup "/home/webapp/www/searchapp/current/config.ru"
environment 'production'
pidfile "/home/webapp/www/searchapp/shared/tmp/pids/puma.pid"
state_path "/home/webapp/www/searchapp/shared/tmp/pids/puma.state"
stdout_redirect '/home/webapp/www/searchapp/shared/log/puma_access.log', '/home/webapp/www/searchapp/shared/log/puma_error.log', true
threads 4,8
bind 'unix:///home/webapp/www/searchapp/shared/tmp/sockets/puma.sock'
workers 1
prune_bundler
on_restart do
puts 'Refreshing Gemfile'
ENV["BUNDLE_GEMFILE"] = "/home/webapp/www/searchapp/current/Gemfile"
end |
update it to latest 2.12.3 and it works |
Going to see if I can maybe track the issue down myself, but figure I'd open this issue up in the meantime.
In the first example, with the prune_bundler option in the config, the process dies after the USR2 signal, giving the error that's listed below. Once this option is removed from config, it restarts properly with this signal (see the second example).
The text was updated successfully, but these errors were encountered: