[master] 4dcb8fb92 keep the dog in the kennel unless there's a queue
Nils Goroll
nils.goroll at uplex.de
Tue Oct 9 10:50:05 UTC 2018
commit 4dcb8fb925dff2597311d069818644d57451c7d6
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Oct 9 12:38:25 2018 +0200
keep the dog in the kennel unless there's a queue
As long as we are not queuing any threads, there is no queue to
move. We record the queue marker the first time we notice queuing and
only then see if it doesn't move.
Fixes #2794
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index 3d4411cb4..9b26013cd 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -510,14 +510,15 @@ pool_herder(void *priv)
* Instead we implement a watchdog and kill the worker if
* nothing has been dequeued for that long.
*/
- if (dq != pp->ndequeued) {
+ if (pp->lqueue == 0) {
+ dq = pp->ndequeued + 1;
+ } else if (dq != pp->ndequeued) {
dq = pp->ndequeued;
dqt = VTIM_real();
- } else if (pp->lqueue &&
- VTIM_real() - dqt > cache_param->wthread_watchdog) {
+ } else if (VTIM_real() - dqt > cache_param->wthread_watchdog) {
VSL(SLT_Error, 0,
- "Pool Herder: Queue does not move ql=%u dt=%f",
- pp->lqueue, VTIM_real() - dqt);
+ "Pool Herder: Queue does not move ql=%u dt=%f",
+ pp->lqueue, VTIM_real() - dqt);
WRONG("Worker Pool Queue does not move");
}
wthread_min = cache_param->wthread_min;
More information about the varnish-commit
mailing list