From 16b296c97eea7b1007ef2a0573034cfc6a8f5b6d Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 7 Oct 2019 11:28:21 -0600 Subject: [PATCH] systemd: Prevent excessive restarts in tight loop --- dist/init/linux-systemd/caddy.service | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/init/linux-systemd/caddy.service b/dist/init/linux-systemd/caddy.service index 292970509..55251fb8b 100644 --- a/dist/init/linux-systemd/caddy.service +++ b/dist/init/linux-systemd/caddy.service @@ -7,6 +7,11 @@ Wants=network-online.target systemd-networkd-wait-online.service [Service] Restart=on-abnormal +; Do not allow the process to be restarted in a tight loop. If the +; process fails to start, something critical needs to be fixed. +StartLimitIntervalSec=14400 +StartLimitBurst=10 + ; User and group the process will run as. User=www-data Group=www-data