From: Willy Tarreau Date: Tue, 19 May 2026 13:05:52 +0000 (+0200) Subject: BUG/MEDIUM: limits: properly account for global.maxpipes in compute_ideal_maxconn() X-Git-Tag: v3.4-dev13~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0284be5456a04e49dd529fdcce0e12108f28a1f0;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: limits: properly account for global.maxpipes in compute_ideal_maxconn() Starting a config with maxpipes and no maxconn always ended up in error because the number of FDs needed for pipes was not deduced from the total number of FDs when calculating maxconn, and was later found to exceed the total number of allocatable FD during final checks. When global.maxpipes is set, it must be used during compute_ideal_maxconn() so that it's properly deduced. Without this, just having "maxpipes 500" in a config prevents it from starting. With the fix, it properly starts with a maxconn adjusted depending on the number of splice-enabled proxies. This should be backported, theoretically everywhere, but preferably progressively. The following config should fail on affected versions and load with fixed ones: global maxpipes 500 frontend srv1 bind :8001 --- diff --git a/src/limits.c b/src/limits.c index 6587ee9b7..fcd929752 100644 --- a/src/limits.c +++ b/src/limits.c @@ -116,7 +116,7 @@ static int compute_ideal_maxconn() { int ssl_sides = !!global.ssl_used_frontend + !!global.ssl_used_backend; int engine_fds = global.ssl_used_async_engines * ssl_sides; - int pipes = compute_ideal_maxpipes(); + int pipes = global.maxpipes ? global.maxpipes : compute_ideal_maxpipes(); int remain = MAX(rlim_fd_cur_at_boot, rlim_fd_max_at_boot); int maxconn;