]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: mworker: set the mworker-max-reloads to 50
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Nov 2025 10:15:37 +0000 (11:15 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Nov 2025 10:54:30 +0000 (11:54 +0100)
There was no mworker-max-reload value by default, it was set to INT_MAX
so this was impossible to reach.

The default value is now 50, which is still high, but no workers should
undergo that much reloads. Meaning that a worker will be killed with
SIGTERM if it reach this much reloads.

doc/configuration.txt
src/mworker.c

index daf5de5e274320a93de5f0798165c2fad9a18e43..6431d7645d09e48669b9cabd3c1d2a96e12e2d67 100644 (file)
@@ -2984,6 +2984,8 @@ mworker-max-reloads <number>
   SIGTERM. This option helps to keep under control the number of workers.
   See also "show proc" in the Management Guide.
 
+  By default this value is set to 50.
+
 nbthread <number>
   This setting is only available when support for threads was built in. It
   makes HAProxy run on <number> threads. "nbthread" also works when HAProxy is
index ab0e0547d68288ddbfbc338f9a31d631c38f2e6f..99bbc07005214cfe5de537b9e4d25d532c8532fd 100644 (file)
@@ -46,7 +46,7 @@
 
 
 static int exitcode = -1;
-int max_reloads = INT_MAX; /* max number of reloads a worker can have until they are killed */
+int max_reloads = 50; /* max number of reloads a worker can have until they are killed */
 int load_status; /* worker process startup status: 1 - loaded successfully; 0 - load failed */
 struct mworker_proc *proc_self = NULL; /* process structure of current process */
 struct list mworker_cli_conf = LIST_HEAD_INIT(mworker_cli_conf); /* master CLI configuration (-S flag) */