From: William Lallemand Date: Mon, 17 Nov 2025 10:15:37 +0000 (+0100) Subject: MEDIUM: mworker: set the mworker-max-reloads to 50 X-Git-Tag: v3.3-dev14~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03672273754efc979057e61872cf83df8f7273e1;p=thirdparty%2Fhaproxy.git MEDIUM: mworker: set the mworker-max-reloads to 50 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. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index daf5de5e2..6431d7645 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -2984,6 +2984,8 @@ mworker-max-reloads 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 This setting is only available when support for threads was built in. It makes HAProxy run on threads. "nbthread" also works when HAProxy is diff --git a/src/mworker.c b/src/mworker.c index ab0e0547d..99bbc0700 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -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) */