]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEBUG: wdt: set the default blocked task delay to 100 ms
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Nov 2024 16:51:57 +0000 (17:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Nov 2024 17:35:42 +0000 (18:35 +0100)
The warn-blocked-traffic-after can be significantly lowered. In any
case, in order to be usable it must be well below the limit to have a
chance to emit exploitable traces before the watchdog finally fires.
Even configured at 1ms it looks very difficult to trigger it on a
laptop doing SSL and compression, so applying a 100-fold factor to
cover for large configs and small machines sounds sane for 3.1. In any
case, even at 100ms, the service degradation becomes quite visible.

doc/configuration.txt
src/wdt.c

index 7faf865ab6e8f287e3da57673d5a9dc92788f330..21fc7e0cd6c94d4b9473ba9bd1121aa222d2d6c0 100644 (file)
@@ -4398,7 +4398,7 @@ quiet
 warn-blocked-traffic-after <time>
   This allows to adjust the delay after which a stuck task blocking the traffic
   will trigger the emission of a warning on the standard error output. The
-  delay is expressed in milliseconds and defaults to 1000 ms. Permitted values
+  delay is expressed in milliseconds and defaults to 100 ms. Permitted values
   must be comprised between 1 ms and 1000 ms included. Lower values will
   trigger warnings frequently and higher ones will rarely. The watchdog will
   kill a runaway task that fails to respond twice for one second anyway, so a
index edd9c09b31f7153d9a5f0e679a277fb6d491970e..dcec435d4af2aca3474e620722e54ffeb545a322 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -44,7 +44,7 @@ static struct {
 } per_thread_wd_ctx[MAX_THREADS];
 
 /* warn about stuck tasks after this delay (ns) */
-static unsigned int wdt_warn_blocked_traffic_ns = 1000000000U;
+static unsigned int wdt_warn_blocked_traffic_ns = 100000000U;
 
 /* Setup (or ping) the watchdog timer for thread <thr>. Returns non-zero on
  * success, zero on failure. It interrupts once per second of CPU time. It