From 0284be5456a04e49dd529fdcce0e12108f28a1f0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 19 May 2026 15:05:52 +0200 Subject: [PATCH] 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 --- src/limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;