Skip to content

Commit

Permalink
DEBUG: wdt: set the default blocked task delay to 100 ms
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wtarreau committed Nov 6, 2024
1 parent 84dd05e commit 5f4fe20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f4fe20

Please sign in to comment.