mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 23:01:03 +01:00
[MEDIUM] listeners: don't stop proxies when global maxconn is reached
Now we don't have to stop proxies anymore since their listeners will be queued if they attempt to accept a connection past the global limits.
This commit is contained in:
parent
07687c171e
commit
2242649b3a
14
src/proxy.c
14
src/proxy.c
@ -482,6 +482,10 @@ void maintain_proxies(int *next)
|
|||||||
|
|
||||||
/* if there are enough free sessions, we'll activate proxies */
|
/* if there are enough free sessions, we'll activate proxies */
|
||||||
if (actconn < global.maxconn) {
|
if (actconn < global.maxconn) {
|
||||||
|
/* We should periodically try to enable listeners waiting for a
|
||||||
|
* global resource here.
|
||||||
|
*/
|
||||||
|
|
||||||
for (; p; p = p->next) {
|
for (; p; p = p->next) {
|
||||||
/* check the various reasons we may find to block the frontend */
|
/* check the various reasons we may find to block the frontend */
|
||||||
if (p->feconn >= p->maxconn)
|
if (p->feconn >= p->maxconn)
|
||||||
@ -519,16 +523,6 @@ void maintain_proxies(int *next)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { /* block all proxies */
|
|
||||||
while (p) {
|
|
||||||
if (p->state == PR_STRUN) {
|
|
||||||
for (l = p->listen; l != NULL; l = l->next)
|
|
||||||
disable_listener(l);
|
|
||||||
p->state = PR_STIDLE;
|
|
||||||
}
|
|
||||||
p = p->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stopping) {
|
if (stopping) {
|
||||||
struct peers *prs;
|
struct peers *prs;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user