aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/supervise-daemon-defaults.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openrc/supervise-daemon-defaults.patch')
-rw-r--r--main/openrc/supervise-daemon-defaults.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/openrc/supervise-daemon-defaults.patch b/main/openrc/supervise-daemon-defaults.patch
new file mode 100644
index 00000000000..53a70bb9c12
--- /dev/null
+++ b/main/openrc/supervise-daemon-defaults.patch
@@ -0,0 +1,31 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Wed, 16 Nov 2022 01:47:34 +0100
+Subject: [PATCH] Provide more reasonable defaults for supervise-daemon
+
+The vendor's default parameters for the supervise-daemon are unreasonable
+or even unusable for most of the services (empirically found), especially
+respawn_delay=0 (i.e. respawn crashed service immediately).
+
+--- a/etc/rc.conf
++++ b/etc/rc.conf
+@@ -315,3 +315,20 @@
+ # If this is set to no, we do not send sigkill to all processes in the
+ # cgroup.
+ #rc_send_sigkill="YES"
++
++##############################################################################
++# SUPERVISE DAEMON CONFIGURATION VARIABLES
++# These variables sets more reasonable defaults for supervise-daemon(8).
++# They may be overriden on a per service basis.
++
++# Wait this number of seconds before restarting a daemon after it crashes.
++respawn_delay=2
++
++# Sets the maximum number of times a daemon will be respawned during a respawn
++# period. If a daemon dies more than this number of times during a respawn
++# period, supervise-daemon(8) will give up trying to respawn it and exit.
++# 0 means unlimited.
++respawn_max=5
++
++# Sets the length in seconds of a respawn period.
++respawn_period=1800