Problem
Processes crash, deadlock, or leak resources, and waiting for a person to notice and restart them extends outages and burns on-call time. Many faults are transient and fixed by a clean restart.
Also known as: watchdog-timer, auto-remediation, supervisor-restart
Automatically detect stuck or failed components and restart or replace them without human intervention.
Processes crash, deadlock, or leak resources, and waiting for a person to notice and restart them extends outages and burns on-call time. Many faults are transient and fixed by a clean restart.
A watchdog turns operational knowledge into automation: if a component stops making progress, restart it. The approach comes from hardware watchdog timers and is the core of Erlang supervisors and Kubernetes restart policies.
The monitored component must regularly prove progress, and the supervisor acts when it does not.
loop:
do work
watchdog.kick() # resets countdown
supervisor:
if no kick for 30s:
dump threads and heap
restart component
backoff = min(backoff * 2, 5m)
if restarts > 5 in 10m: quarantine and page
Kick the watchdog from the place that proves useful work, such as after processing a message, not from an independent timer thread.
Low, supervisor tooling is common
Medium, tune thresholds and escalation
Low to medium
Crash loop repeatedly restarts a poisoned component and hammers dependencies
Watchdog thread keeps kicking while main work is stuck
Mass restart triggered by shared dependency outage causes a thundering herd