mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-04 00:41:41 +01:00
It's not normal that external processes are run with high FD limits, as quite often such processes (especially shell scripts) will iterate over all FDs to close them. Ideally we should even provide a tunable with the external-check directive to adjust this value, but at least we need to restore it to the value that was active when starting haproxy (before it was adjusted for maxconn). Additionally with very low maxconn values causing rlim_fd_cur to be low, some heavy checks could possibly fail. This was also mentioned in issue #45. Currently the following config and scripts report this : $ cat rlim.cfg global maxconn 500000 external-check listen www bind :8001 timeout client 5s timeout server 5s timeout connect 5s option external-check external-check command "$PWD/sleep1.sh" server local 127.0.0.1:80 check inter 1s $ cat sleep1.sh #!/bin/sh /bin/sleep 0.1 echo -n "soft: ";ulimit -S -n echo -n "hard: ";ulimit -H -n # ./haproxy -db -f rlim.cfg soft: 1000012 hard: 1000012 soft: 1000012 hard: 1000012 Now with the fix : # ./haproxy -db -f rlim.cfg soft: 1024 hard: 4096 soft: 1024 hard: 4096 This fix should be backported to stable versions but it depends on "MINOR: global: keep a copy of the initial rlim_fd_cur and rlim_fd_max values" and "BUG/MINOR: init: never lower rlim_fd_max".
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
C
98.1%
Shell
0.9%
Makefile
0.5%
Lua
0.2%
Python
0.1%