Abstract

A method is disclosed for deciding when a periodic, stateless watchdog should restart a long-running worker, such as an AI agent worker in a container, whose self-reported heartbeat has stopped advancing. Because the status store keeps only each worker's latest heartbeat, the watchdog builds its own history: in every cycle in which its detector is enabled it copies each candidate worker's latest heartbeat into a history store under a uniqueness constraint on worker identity and beat timestamp, so every stored value is a genuine beat time, unchanged cycles add nothing, and a worker beating faster than the watchdog samples yields intervals quantized to the watchdog's sampling granularity. From that history it computes per worker an accrual suspicion level, the negative base-10 logarithm of the normal tail probability of the observed silence with a floored deviation. A level above a threshold marks the worker stale, possibly earlier than a fixed timeout would; a level within it defers a worker the fixed timeout would restart. Thin histories and failures of this path fall back to the fixed timeout. A stale worker is spared when a separate work-activity log, not gated by the heartbeat's reporting switch, holds a recent row attributed to it. A cooldown brake requires a full-jitter exponential backoff gap over the count of recent restarts, floored at a fixed base, whose random variate is seeded by the workload identity and the timestamp of its most recent restart, so repeated re-evaluation does not collapse the draw toward its floor.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS