seuros / capistrano-puma

Puma integration for Capistrano
https://github.com/seuros/capistrano-puma
MIT License
615 stars 299 forks source link

Failed with result 'watchdog'. #362

Closed jlebrijo closed 1 year ago

jlebrijo commented 1 year ago

Thanks for the gem and your work on this!

I am trying to deploy with puma in a Ubuntu server. Problem is that server restarts every few seconds. If I do tail -f /var/log/syslog, I get it every few seconds:

Feb 28 17:28:19 staging systemd[315765]: Started Puma HTTP Server for lawsoft (staging).
Feb 28 17:28:29 staging systemd[315765]: lawsoft_puma_staging.service: Watchdog timeout (limit 10s)!
Feb 28 17:28:29 staging systemd[315765]: lawsoft_puma_staging.service: Killing process 1715645 (ruby) with signal SIGABRT.
Feb 28 17:28:30 staging systemd[315765]: lawsoft_puma_staging.service: Main process exited, code=dumped, status=6/ABRT
Feb 28 17:28:30 staging systemd[315765]: lawsoft_puma_staging.service: Failed with result 'watchdog'.
Feb 28 17:28:30 staging systemd[315765]: lawsoft_puma_staging.service: Consumed 5.961s CPU time.
Feb 28 17:28:31 staging systemd[315765]: lawsoft_puma_staging.service: Scheduled restart job, restart counter is at 15.
Feb 28 17:28:31 staging systemd[315765]: Stopped Puma HTTP Server for lawsoft (staging).
Feb 28 17:28:31 staging systemd[315765]: lawsoft_puma_staging.service: Consumed 5.961s CPU time.

And Puma restarting every moment in current directory log current/log/puma.access.log.

Any help will be really appreciate!

jlebrijo commented 1 year ago

I have found the problem!

Regarding this documentation: https://github.com/puma/puma/blob/master/docs/systemd.md systemd Type should be "notify" to respond watchdog. But in this gem it is "simple" by default.

Solution, set to "notify" the type in your deploy.rb file:

set :puma_service_unit_type, "notify"

I will write a PR to prevent this failure.

github-actions[bot] commented 1 year ago

Stale issue message