From 7712e7a3cfb2c213e613cc561de1a06fba9eb1e0 Mon Sep 17 00:00:00 2001 From: taitus Date: Tue, 13 May 2025 18:53:56 +0200 Subject: [PATCH] Set WatchdogSec=0 in Puma systemd unit template The original template sets WatchdogSec=10, which causes systemd to kill Puma if it remains silent for more than 10 seconds. This commit changes WatchdogSec to 0 in our custom puma.service.erb, disabling the watchdog feature. This prevents unwanted restarts and avoids errors like: > consul_puma_staging.service: Failed with result 'watchdog' --- lib/capistrano/templates/puma.service.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capistrano/templates/puma.service.erb b/lib/capistrano/templates/puma.service.erb index e546f11dc..75d3dd850 100644 --- a/lib/capistrano/templates/puma.service.erb +++ b/lib/capistrano/templates/puma.service.erb @@ -16,7 +16,7 @@ After=syslog.target network.target [Service] Type=<%= service_unit_type %> -WatchdogSec=10 +WatchdogSec=0 <%="User=#{puma_user(@role)}" if fetch(:puma_systemctl_user) == :system %> WorkingDirectory=<%= current_path %> ExecStart=<%= expanded_bundle_command %> exec puma -e <%= fetch(:puma_env) %>