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
Restarting via SIGUSR2
broken in 3.9.0 works in 3.8.2
#1308
Comments
pinging @grosser who recently touched this |
hmm I think this is because it restarts with an environment that does not have bundler |
it works when running via the whole |
fixing here #1309 |
@grosser how could I repro this with a rails app? rails s, bin/puma, bundle exec puma, puma all work for me. |
|
the trick is to |
Still nothing. |
add gemspec to Gemfile and remove the dependencies like #1313 does then
-> kaboom |
should be fixed in 3.9.1 too ... but it removes |
@dguettler confirmed fixed ? |
@grosser 3.9.1 still seems to be failing for me
It tries to use globally installed version. When uninstalling global versions I'm getting
|
what bundler version are you on ? |
nvm ... was able to reproduce ... weird ... will take another look |
this would only happen if bundler has finally fixed the issue that |
#1317 should do the trick then ... temp-fix would be to add |
Experienced the same problem - simply updating to the latest version of bundler (1.15.1) fixed it for me. |
FYI you'd be restarting with the same Gemfile/Load-paths so changing a gem (especially puma) would not work ... use https://github.com/zendesk/samson/blob/master/config/puma.rb#L15-L33 until rubygems/bundler#5701 is released. |
That does still seem to be the case, but why? BUNDLE_GEMFILE is no longer present in the new puma process but the $LOAD_PATH is still wrong/old |
Bundle.original_env needs a patch that is in bundler master to work as
intended ... for the time being the patch I linked should work fine.
…On Mon, Jun 26, 2017 at 10:10 PM, bughit ***@***.***> wrote:
@grosser <https://github.com/grosser>
FYI you'd be restarting with the same Gemfile/Load-paths
That does still seem to be the case, but why? BUNDLE_GEMFILE is no longer
present in the new puma process but the $LOAD_PATH is still wrong/old
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1308 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZyVBAJalKb6tbsFWjMEaHhbgxboAks5sIBApgaJpZM4NtbSQ>
.
|
idk why anyone would want to start a random version of puma ... so I'm doing |
Experiments with restart https://github.com/stereobooster/ruby-server-experiment/tree/master/puma-symlink |
Good stuff :)
Using https://github.com/zendesk/samson/blob/master/config/puma.rb#L28-L33
and everything works ... new gem/ENV on every reload ...
…On Sun, Jul 2, 2017 at 7:54 PM, stereobooster ***@***.***> wrote:
Experiments with restart https://github.com/stereobooster/ruby-server-
experiment/tree/master/puma-symlink
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1308 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZxfstvzwsYOsJzYVZTMzGPgQHEbwks5sJ9lSgaJpZM4NtbSQ>
.
|
@grosser https://github.com/stereobooster/ruby-server-experiment/tree/master/puma-symlink-grosser UPD: @grosser why do you prefer USR2 over USR1 restart? PS simplified patch require 'bundler/setup'
on_restart do
ENV.replace(Bundler.clean_env)
end |
none of the options and workarounds worked for me on 3.9.1, had to rollback to 3.8.2 which works fine |
ruby -v
gem -v
bundle -v
rails -v
uname -a |
@stereobooster tried your simplified patch as well but with no luck.
|
Same here. Workaround didn't help, downgrading to 3.8.2 works
|
@stereobooster the error is different: As mentioned here, fIx is for:
but the error I (and probably others) am getting is:
Info:
Okay, using |
I've just been bitten by this, here is my config: Ruby: 2.3.3p222 |
I can confirm that switching back to puma 3.8.1 solved the issue. |
The current version of Puma seems to have problems with restarting, downgrade to 3.8.1 should fix this. See also: seuros/capistrano-puma#237 and puma/puma#1308
this setup works fine for me ...
|
The above fix doesn't seem likely to solve the problem reported in the first comment (with dependencies not being found), so forgive me if I'm not testing it. Instead of downgrading, though, we've settled on the |
Yeah, found this bug while trying to reproduce the restarting issue ... mind trying out https://github.com/grosser/puma-restart (using puma from master + my patch) and tell me if that works for you too ? |
@grosser That works. But it works even if I use gem 'puma', git: 'https://github.com/grosser/puma.git', branch: 'master' instead of your fix branch. |
And this example fails with |
I also reproduced this using with sinatra. (also 3.8.2 works well) $ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
$ gem -v
2.6.8
$ bundle -v
Bundler version 1.15.3
$ uname -a
Darwin PC103323.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
$ rbenv -v
rbenv 1.1.1-2-g615f844 Using with alexch/rerun
|
can you try with master to see if that fixes it ? @nateberkopec want to make a release to see if some of these get solved ? |
It seems fixed at a771ec3 ! |
obviously missing Teapot ;)
I think it was not passing in -rbundler/setup so the new process tried to
load puma without bundler and blew up
…On Sun, Aug 13, 2017 at 4:36 AM, kyontan ***@***.***> wrote:
It seems fixed at a771ec3
<a771ec3>
!
What's the reason of this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1308 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZ6TsSz9wdc5gMEr5eI2eHSxOwsFyks5sXt-2gaJpZM4NtbSQ>
.
|
Closed by #1385 |
Steps to reproduce
Updated application from puma 3.8.2 to 3.9.0
start puma server
bundle exec puma -p 3000
send USR2
kill -SIGUSR2 <pid>
Expected behavior
Puma server should be restarting and does so correctly in 3.8.2
Actual behavior
With version 3.9.0 the outcome is
System configuration
Ruby version: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Rails version: rails-5.0.3
The text was updated successfully, but these errors were encountered: