Bot Crash Guard Watchdog Reference
Ensure genuine 24/7 continuous uptime for Discord and Telegram bots with automated process supervision, exponential restart backoff, and memory leak mitigation.
1. Watchdog Daemon Overview
Standard Pterodactyl panels halt when a container exits unexpectedly. The Crash Guard Watchdog continuously monitors your bot’s PID inside the Docker container. If the application terminates with an exit code other than 0 (clean shutdown), the watchdog immediately schedules an automated container reboot.
2. Configurable Delay & Backoff Timers
In your panel under Crash Guard settings:
- Auto-Restart Enabled: Master toggle to activate watchdog supervision.
- Restart Delay (seconds): Cooldown before restarting (default: 5 seconds). Gives APIs time to clear closed socket states.
- Max Crash Quota: Maximum number of restarts allowed within a rolling 5-minute window (default: 5).
3. Bootloop Suppression Algorithm
If your bot has a fatal syntax error, restarting every second would hammer CPU cores and get your IP rate-limited by Discord. The Crash Guard algorithm detects rapid consecutive failures:
Bootloop Safety Lock
4. Crash Incident Logs
The extension records a timestamped crash ledger in crash-guard.log, detailing exit codes, runtime uptime prior to failure, and memory usage at the time of termination.