]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] listeners: put listeners in queue upon resource shortage
authorWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 20:58:00 +0000 (22:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 20:58:00 +0000 (22:58 +0200)
commit08ceb1012bb8a35dd24eb9f84e9e110b2ae7aeaa
tree4316f14d91e529f9fdf273f97fef2b3cda5abec1
parente6ca1fcd845f051f1465219d93f3be2e716b7de6
[MEDIUM] listeners: put listeners in queue upon resource shortage

When an accept() fails because of a connection limit or a memory shortage,
we now disable it and queue it so that it's dequeued only when a connection
is released. This has improved the behaviour of the process near the fd limit
as now a listener with a no connection (eg: stats) will not loop forever
trying to get its connection accepted.

The solution is still not 100% perfect, as we'd like to have this used when
proxy limits are reached (use a per-proxy list) and for safety, we'd need
to have dedicated tasks to periodically re-enable them (eg: to overcome
temporary system-wide resource limitations when no connection is released).
include/types/global.h
src/haproxy.c
src/session.c
src/stream_sock.c