HAProxy maxconns needs full restart (not reload)
Bug #1867063 reported by
Haw Loeung
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Content Cache Charm |
Fix Released
|
Medium
|
Haw Loeung |
Bug Description
Hi,
As seen today, when increasing maxconns, a full HAProxy restart is required in order for it to increase the ulimit max. fds / open files. A reload respawns the child process but the master still has that limit and is inherited.
We should either restart or flag that it needs restarting and for admins to run a juju action to restart it. This should be done only if the ulimit for processes are lower than the global maxconns.
Or maybe even override the systemd service setting it to unlimited for HAProxy (LimitNOFILE=
Related branches
~hloeung/content-cache-charm:master
- Stuart Bishop (community): Approve
- Content Cache Charmers: Pending requested
-
Diff: 355 lines (+244/-21)6 files modifiedlib/haproxy.py (+20/-0)
reactive/content_cache.py (+1/-0)
tests/unit/files/haproxy.pid (+1/-0)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+159/-0)
tests/unit/test_content_cache.py (+23/-19)
tests/unit/test_haproxy.py (+40/-2)
~hloeung/content-cache-charm:haproxy-config
- Stuart Bishop (community): Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 120 lines (+70/-3)4 files modifiedlib/haproxy.py (+9/-3)
lib/utils.py (+28/-0)
tests/unit/files/limits.txt (+17/-0)
tests/unit/test_utils.py (+16/-0)
description: | updated |
description: | updated |
Changed in content-cache-charm: | |
assignee: | nobody → Haw Loeung (hloeung) |
status: | New → In Progress |
Changed in content-cache-charm: | |
importance: | Undecided → Medium |
Changed in content-cache-charm: | |
status: | In Progress → Fix Committed |
Changed in content-cache-charm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Also figure out this one:
| Mar 11 21:47:38 cactuar haproxy[16470]: [WARNING] 070/214735 (16470) : [/usr/sbin/ haproxy. main()] Cannot raise FD limit to 14592571, limit is 1048576. haproxy. main()] FD limit (1048576) too low for maxconn= 7296000/ maxsock= 14592571. Please raise 'ulimit-n' to 14592571 or more to avoid any trouble.
| Mar 11 21:47:38 cactuar haproxy[16470]: [WARNING] 070/214735 (16470) : [/usr/sbin/