Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

puma and delayed_job process does not restart after deployment #251

Closed
kzkn opened this issue Jan 14, 2021 · 2 comments
Closed

puma and delayed_job process does not restart after deployment #251

kzkn opened this issue Jan 14, 2021 · 2 comments

Comments

@kzkn
Copy link
Contributor

kzkn commented Jan 14, 2021

@ajgon
I use v1.20.1, thank you for your support for puma 5!

Expected Behavior

Restarts puma and delayed_job process after deployment.

Actual Behavior

puma and delayed_job process does not restart after deployment.

Log

This is the syslog from the start of deployment to the end.

Jan 14 23:39:21 myserver monit[10273]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:21 myserver monit[10273]: Reinitializing monit daemon
Jan 14 23:39:21 myserver monit[952]: Reinitializing Monit -- control file '/etc/monit/monitrc'
Jan 14 23:39:21 myserver monit[10276]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:21 myserver monit[10276]: Reinitializing monit daemon
Jan 14 23:39:21 myserver monit[952]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:21 myserver monit[952]: 'myserver' Monit reloaded
Jan 14 23:39:44 myserver crontab[10408]: (deploy) LIST (deploy)
Jan 14 23:39:44 myserver crontab[10409]: (deploy) REPLACE (deploy)
Jan 14 23:39:44 myserver monit[10410]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:44 myserver monit[952]: 'puma_rails' restart on user request
Jan 14 23:39:44 myserver monit[952]: Monit daemon with PID 952 awakened
Jan 14 23:39:44 myserver monit[952]: Awakened by User defined signal 1
Jan 14 23:39:44 myserver monit[952]: Reinitializing Monit -- control file '/etc/monit/monitrc'
Jan 14 23:39:44 myserver monit[10413]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:44 myserver monit[952]: 'delayed_job_rails-1' restart on user request
Jan 14 23:39:44 myserver monit[952]: Monit daemon with PID 952 awakened
Jan 14 23:39:44 myserver monit[952]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:39:44 myserver monit[952]: 'myserver' Monit reloaded
Jan 14 23:39:44 myserver systemd[1]: Reloading nginx - high performance web server.

And this is the syslog when I ran monit restart manually. This works fine.

Jan 14 23:41:40 myserver sudo[10511]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Jan 14 23:41:40 myserver monit[10512]: Skipping 'allow localhost' -- host resolved to [::ffff:127.0.0.1] which is present in ACL already
Jan 14 23:41:40 myserver monit[952]: 'puma_rails' restart on user request
Jan 14 23:41:40 myserver monit[952]: Monit daemon with PID 952 awakened
Jan 14 23:41:40 myserver monit[952]: Awakened by User defined signal 1
Jan 14 23:41:40 myserver monit[952]: 'puma_rails' trying to restart
Jan 14 23:41:40 myserver monit[952]: 'puma_rails' stop: '/bin/sh -c cat /run/lock/rails/puma.pid | xargs --no-run-if-empty kill -QUIT; sleep 5'
Jan 14 23:41:40 myserver sudo[10511]: pam_unix(sudo:session): session closed for user root
Jan 14 23:41:45 myserver monit[952]: 'puma_rails' start: '/bin/sh -c cd /srv/www/rails/current && MYENV="xxxxxx
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] Puma starting in cluster mode...
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] * Puma version: 5.1.1 (ruby 2.7.1-p83) ("At Your Service")
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *  Min threads: 0
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *  Max threads: 16
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *  Environment: staging
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *   Master PID: 10520
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *      Workers: 2
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] *     Restarts: (✔) hot (✖) phased
Jan 14 23:41:46 myserver puma-rails[10521]: [10520] * Preloading application
Jan 14 23:41:49 myserver puma-rails[10521]: [10520] * Listening on unix:///srv/www/rails/shared/sockets/puma.sock
Jan 14 23:41:49 myserver puma-rails[10521]: [10520] Use Ctrl-C to stop
@kzkn
Copy link
Contributor Author

kzkn commented Jan 15, 2021

related? #29

kzkn added a commit to kzkn/opsworks_ruby that referenced this issue Jan 16, 2021
kzkn added a commit to kzkn/opsworks_ruby that referenced this issue Jan 19, 2021
@willkoehler
Copy link

willkoehler commented Feb 1, 2021

I've been exploring this issue in #244 culminating in #244 (comment)

It looks like @kzkn was ahead of me and has a preposed fix.

EDIT: I can confirm #252 fixes the problem for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants