Increase watchdog timeout to 30 minutes

Changed from 10 to 30 minutes to avoid false positives when
heartbeatMinutes is set to 10. The watchdog should be significantly
longer than the heartbeat interval to account for:
- Network latency
- Slow command responses
- Brief connection hiccups

With heartbeatMinutes=10, a 30-minute watchdog gives 3x buffer before
triggering auto-restart.
This commit is contained in:
Peter Steinberger
2025-11-30 18:03:19 +00:00
parent 21ba0fb8a4
commit c5677df56e
2 changed files with 3 additions and 2 deletions

View File

@@ -518,7 +518,8 @@ export async function monitorWebProvider(
let lastInboundMsg: WebInboundMsg | null = null;
// Watchdog to detect stuck message processing (e.g., event emitter died)
const MESSAGE_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes without any messages
// Should be significantly longer than heartbeatMinutes to avoid false positives
const MESSAGE_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes without any messages
const WATCHDOG_CHECK_MS = 60 * 1000; // Check every minute
const listener = await (listenerFactory ?? monitorWebInbox)({