]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: listener: Wake proxy's mngmt task up if necessary on session release
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 12 Mar 2024 06:31:56 +0000 (07:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Mar 2024 14:20:06 +0000 (15:20 +0100)
commit65ae1347c7d0495c70221dca3fdda20a04d53628
tree2dc67ec1e2c63a9dcfddcdb63b78e5950b04804b
parent9c2e900a9bc56e13a8cf2d3f042dd2897b4e2b1d
BUG/MINOR: listener: Wake proxy's mngmt task up if necessary on session release

When a session is released, listener_release() function is called to notify
the listener. It is an opportunity to resume limited/full listeners. We
first try to resume the listener owning the released session, then all
limited listeners in the global queue and finally all limited listeners in
the frontend's waiting queue. This last step is only performed if there is
no limit applied on the frontend. Nothing is performed if the session rate is
still limited. And it is an issue because if this happens for the last
listener's session, there is no other event to wake the frontend's managment
task up and the listener remains in the limited state.

To fix the issue, when a limit is still applied on the frontent, we must
compute the new wake up date from the sessions rate and schedule the
frontend's managment task.

It is easy to reproduce the issue in SSL by setting a maxconn and a rate
limit on sessions.

This patch should fix the issue #2476. It must be backported to all stable
versions.
src/listener.c