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.
This commit is contained in:
William Lallemand 2025-11-17 11:15:37 +01:00
parent c67a614e45
commit 0367227375
2 changed files with 3 additions and 1 deletions

View 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

View 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) */