]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: init/threads: continue to limit default thread count to max per group
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 07:04:46 +0000 (08:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 07:14:35 +0000 (08:14 +0100)
commit400b3ae2d59e6f64f0fe9c702786f67d7cb66810
tree741bd9be8115994f25926c15d0566cd4afe8d898
parentf648767a4eb0c24616eeb6da34d28681ff1dc2c9
BUG/MINOR: init/threads: continue to limit default thread count to max per group

Jakub Vojacek reported in issue #1955 that haproxy 2.7.0 doesn't start
anymore on a 128-CPU machine with a default config. The reason is the
raise of the default MAX_THREADS value that came with thread groups.
Previously, the maximum number of threads was simply limited to this
value, and all of them fit into one group. Now the limit being higher,
all threads cannot fit by default into a single group, and haproxy fails
to start.

The solution adopted here is to continue to limit the number of threads
to the max supported per group, but to multiply it by the number of groups
(usually 1 by default). In addition, a diag warning is now emitted when
this happens, reminding the user to set nbthread or adjust thread-groups.
We can hardly do more than a diag warning if we don't want to make the
upgrade painful for users.

Thanks to Jakub for reporting this early. This must be backported to 2.7.
src/cfgparse.c