From: Willy Tarreau Date: Thu, 28 May 2026 14:48:51 +0000 (+0200) Subject: BUG/MEDIUM: threads: ignore max-threads-per-group when thread-groups is set X-Git-Tag: v3.4.0~56 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=f5847d11f796edaec3d501ac58eafcbd32efa6bf;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: threads: ignore max-threads-per-group when thread-groups is set As documented, max-threads-per-group is the default number of threads to arrange in a group before creating another group, and is only meant to be used when thread-groups is not set. However it was always enforced, so configs like: global thready-groups 2 which were sufficient in 3.2 and above to start with 64-128 threads are now suddenly limited to 32 threads! Let's relax the limit when thread-groups is set! No backport is needed since this is only 3.4. --- diff --git a/src/thread.c b/src/thread.c index a3e362d52..bb733a602 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1679,8 +1679,11 @@ void thread_detect_count(void) if (global.nbthread) thr_min = thr_max = global.nbthread; - if (global.nbtgroups) + if (global.nbtgroups) { grp_min = grp_max = global.nbtgroups; + /* ignore max-threads-per-group if thread-groups is configured */ + global.maxthrpertgroup = MAX_THREADS_PER_GROUP; + } #if defined(USE_THREAD) /* Adjust to boot settings if not forced */