From 09b35fe0564cefa304f5460e2bf95420e9f3ed96 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 21:53:45 -0500 Subject: Rate-limit the app process restart instead of hot-looping daemon -r restarts immediately with no delay - a genuinely broken deploy (crashes on every start) would hot-loop as fast as the kernel can fork/exec, burning CPU and flooding syslog. -R 5 restarts with a 5s gap instead, matching both Heroku's dyno manager (backs off a repeatedly- crashing dyno rather than hammering it) and dvd.club's own pre-skiff rc.d script, which already used -R 5 before this template replaced it. Verified on the VM: killed the app process directly, confirmed it stayed down through the 1s and 4s marks and was back by 7s - not an immediate restart. Co-Authored-By: Claude Sonnet 5 --- internal/tmpl/rc.d.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/tmpl/rc.d.tmpl b/internal/tmpl/rc.d.tmpl index 134152e..04ba426 100644 --- a/internal/tmpl/rc.d.tmpl +++ b/internal/tmpl/rc.d.tmpl @@ -11,7 +11,7 @@ rcvar="{{.Name}}_enable" pidfile="/var/run/${name}.pid" command="/usr/sbin/daemon" -command_args="-P ${pidfile} -r -t {{.Name}} /app/current/app" +command_args="-P ${pidfile} -R 5 -t {{.Name}} /app/current/app" load_rc_config $name -- cgit v1.3