]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mworker: be careful to restore the original rlim_fd_cur/max on reload
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Mar 2019 09:21:55 +0000 (10:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Mar 2019 10:26:08 +0000 (11:26 +0100)
commit8dca19549ab3b30342b92b56b2c766a6a4ec8d0e
tree5d61f691e4e2b5ad960c3d1ae7a2a64a9920bc34
parent9f6dc72477ee7e7310fb20d88d1ee8ecb6de429e
BUG/MINOR: mworker: be careful to restore the original rlim_fd_cur/max on reload

When the master re-execs itself on reload, it doesn't restore the initial
rlim_fd_cur/rlim_fd_max values, which have been modified by the ulimit-n
or global maxconn directives. This is a problem, because if these values
were set really low it could prevent the process from restarting, and if
they were set very high, this could have some implications on the restart
time, or later on the computed maxconn.

Let's simply reset these values to the ones we had at boot to maintain
the system in a consistent state.

A backport could be performed to 1.9 and maybe 1.8. This patch depends on
the two previous ones.
src/haproxy.c