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
Phased restart issue with Ruby default Gem date
#3033
Comments
Are you using |
Hey @dentarg, I dont use any extra_runtime_dependencies and I think I respect all the recommendations for phased restarts because it's works fine with most updated gems... Only specifics gems create this problem (I think these are just with the default Rails gems, like date on my case). PS : I use capistrano & capistrano-puma to deploy (https://github.com/seuros/capistrano-puma) #config/puma/production.rb
env = "production"
app = "myapp"
app_path = "/srv/apps/#{env}/#{app}"
directory "#{app_path}/current"
bind "unix://#{app_path}/shared/tmp/sockets/puma.sock"
workers 2
threads 1,10
prune_bundler #config/deploy.rb
set :puma_systemctl_user, :system
set :puma_phased_restart, true
set :puma_service_unit_name, "puma_#{fetch(:application)}_#{fetch(:stage)}"
set :puma_access_log, "#{fetch(:deploy_to)}/shared/log/puma_access.log"
set :puma_error_log, "#{fetch(:deploy_to)}/shared/log/puma_error.log" # /etc/systemd/system/puma_myapp_production.service
# This file tells systemd how to run Puma as a 24/7 long-running daemon.
#
# Customize this file based on your bundler location, app directory, etc.
# Customize and copy this into /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Then run:
# - systemctl enable puma_myapp_production
# - systemctl {start,stop,restart} puma_myapp_production
#
#
# Use `journalctl -u puma_myapp_production -rn 100` to view the last 100 lines of log output.
#
[Unit]
Description=Puma HTTP Server for myapp (production)
After=syslog.target network.target
[Service]
Type=notify
WatchdogSec=10
User=root
WorkingDirectory=/srv/apps/production/myapp/current
ExecStart=/usr/local/rvm/bin/rvm 3.1.2@myapp_production do bundle exec puma -e production
ExecReload=/bin/kill -USR1 $MAINPID
# if we crash, restart
RestartSec=1
Restart=on-failure
StandardOutput=append:/srv/apps/production/myapp/shared/log/puma_access.log
StandardError=append:/srv/apps/production/myapp/shared/log/puma_error.log
SyslogIdentifier=puma_myapp_production
[Install]
WantedBy=multi-user.target cap production deploy
|
date
(Never mind my earlier comment about I think this similar to the problems in #2843 and #2893 Puma requires Line 6 in 7b63010
According to the phased restart docs
I think you are running into that limitation of phased restart. I just did
|
This prompted me to create a poll in the discussion forum: #3034 |
About eleven years ago, requiring In the meantime, if you can lock to the version of |
Hey,
After a bundle update, if some gems have been updated (Rails default gem), the phased restart doesn't work.
With all others gems, all works fine.
On this case, date gem was updated form 3.3.1 to 3.3.2
The text was updated successfully, but these errors were encountered: