MEDIUM: init: continue to enforce SYSTEM_MAXCONN with auto settings if set
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Jan 2015 18:03:21 +0000 (19:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Jan 2015 18:03:21 +0000 (19:03 +0100)
commit474b96ad41aa76d3b4c343efac7eb20995b3be1e
treeca0efdd5b2224a7394008da01d1fbe8d87e8c470
parent58048a2dc98bfa7f59d86fe2ca878d95ca2310e3
MEDIUM: init: continue to enforce SYSTEM_MAXCONN with auto settings if set

Commit d025648 ("MAJOR: init: automatically set maxconn and/or maxsslconn
when possible") resulted in a case where if enough memory is available,
a maxconn value larger than SYSTEM_MAXCONN could be computed, resulting
in possibly overflowing other systems resources (eg: kernel socket buffers,
conntrack entries, etc). Let's bound any automatic maxconn to SYSTEM_MAXCONN
if it is defined. Note that the value is set to DEFAULT_MAXCONN since
SYSTEM_MAXCONN forces DEFAULT_MAXCONN, thus it is not an error.
src/haproxy.c