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

restart and pased_restart do not work like stop and start #26

Open
inyerade opened this issue Oct 26, 2018 · 3 comments
Open

restart and pased_restart do not work like stop and start #26

inyerade opened this issue Oct 26, 2018 · 3 comments

Comments

@inyerade
Copy link

inyerade commented Oct 26, 2018

I do a new feature adding a new gem and when I want to deploy I execute mina deploy.

In the deploy the new gem install but the I get error when I go to a page where I use this gem. Then I do a mina puma:phased_restart and the behavor is the same.
Then I do a mina puma:stop and a mina puma:start and work perfect

I do not know what is wrong

@Feuda
Copy link

Feuda commented Dec 27, 2018

@inyerade

Puma phased_restart has two requirements

  1. There are more than two workers, you are able to config it in puma.rb
  2. Enable prune_bundler in puma.rb

Important info https://github.com/puma/puma/blob/master/docs/restart.md

@jmuheim
Copy link

jmuheim commented Sep 16, 2019

I spent hours debugging why deployment wouldn't work, then I finally stumbled over this.

I tried activating 3 workers in puma.rb:

workers ENV.fetch("WEB_CONCURRENCY") { 3 }

But didn't work for me. I just switched to puma:hard_restart in the deploy.rb config. Now it seems to work:

-----> Restart Puma -- hard...
-----> Stopping Puma...
       Puma is not running!
-----> Starting Puma...
       Puma starting in single mode...
       * Version 4.1.1 (ruby 2.4.1-p111), codename: Fourth and One
       * Min threads: 5, max threads: 5
       * Environment: production
       * Daemonizing...

By the way, puma:restart doesn't seem to work:

-----> Restart Puma....
       Puma is not running!

I feel this info should be added to the README.

@jmuheim
Copy link

jmuheim commented Sep 16, 2019

PS: In the docs (https://github.com/puma/puma/blob/master/docs/restart.md), there is no "hard restart" mentioned. Is "hot restart" equivalent to "hard restart"? Or what's the difference?

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

No branches or pull requests

3 participants