mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MEDIUM: dns: Kill idle DNS sessions during stopping stage
There is no server timeout for DNS sessions over TCP. It means idle session cannot be killed by itself. There is a task running peridically, every 5s, to kill the excess of idle sessions. But the last one is never killed. During the stopping stage, it is an issue since the dynamic resolutions are no longer performed (2ec6f14c "BUG/MEDIUM: resolvers: Properly stop server resolutions on soft-stop"). Before the above commit, during stopping stage, the DNS sessions were killed when a resolution was triggered. Now, nothing kills these sessions. This prevents the process to finish on soft-stop. To fix this bug, the task killing excess of idle sessions now kill all idle sessions on stopping stage. This patch must be backported as far as 2.6.
This commit is contained in:
parent
211452ef9a
commit
e0f4717727
@ -1005,7 +1005,7 @@ static struct task *dns_process_idle_exp(struct task *t, void *context, unsigned
|
||||
|
||||
target = (dss->max_active_conns - cur_active_conns) / 2;
|
||||
list_for_each_entry_safe(ds, dsb, &dss->idle_sess, list) {
|
||||
if (!target)
|
||||
if (!stopping && !target)
|
||||
break;
|
||||
|
||||
/* remove conn to pending list to ensure it won't be reused */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user