]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: add global setting "fd-hard-limit" to bound system limits
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 16:02:03 +0000 (18:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 16:04:49 +0000 (18:04 +0200)
commit2df1fbf8161a0dd8f9fbee6fd5c44a2dd8c67e44
tree613ab1d284f4c8a95d79efd4dfc8a583af1c9c27
parent7c9a0fe2a68116d15a3014587277a4ad891dc429
MINOR: init: add global setting "fd-hard-limit" to bound system limits

On some systems, the hard limit for ulimit -n may be huge, in the order
of 1 billion, and using this to automatically compute maxconn doesn't
work as it requires way too much memory. Users tend to hard-code maxconn
but that's not convenient to manage deployments on heterogenous systems,
nor when porting configs to developers' machines. The ulimit-n parameter
doesn't work either because it forces the limit. What most users seem to
want (and it makes sense) is to respect the system imposed limits up to
a certain value and cap this value. This is exactly what fd-hard-limit
does.

This addresses github issue #1622.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c
src/haproxy.c