mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 06:02:33 +02:00
[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).
This commit is contained in:
@@ -123,6 +123,7 @@ extern const struct linger nolinger;
|
||||
extern int stopping; /* non zero means stopping in progress */
|
||||
extern char hostname[MAX_HOSTNAME_LEN];
|
||||
extern char localpeer[MAX_HOSTNAME_LEN];
|
||||
extern struct list global_listener_queue; /* list of the temporarily limited listeners */
|
||||
|
||||
#endif /* _TYPES_GLOBAL_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user