Worker heartbeat send interval/stuck ceiling not configurable from the gateway; no grace > interval check #218
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The worker's heartbeat send interval (5 s) and stuck ceiling (75 s) are compile-time defaults in
WorkerPipeSessionOptions; the gateway never passes them (only an env var would). Nothing validates that the gateway'sHeartbeatGraceSecondsexceeds the worker's real send interval, so a misconfigured grace can kill healthy workers. Found while splitting the heartbeat options in #192.Pass the worker's heartbeat settings from gateway config at spawn (args/env), and add a startup validation rule
grace > worker send interval. Worker is net48 x86 — build on windev.Fixed on main
2e52f9f5: new MxGateway:Worker:WorkerHeartbeatSendIntervalSeconds (5) and WorkerHeartbeatStuckCeilingSeconds (75), exported by WorkerProcessLauncher as MXGATEWAY_WORKER_HEARTBEAT_SEND_INTERVAL_MS / _STUCK_CEILING_MS and read by WorkerPipeSessionOptions.FromEnvironment (missing/invalid → default, never fails the worker). Validator: grace > send interval, interval > 0, worker ceiling > the worker's fixed 15 s watchdog grace, both ≤ 86400 s. Docs/appsettings updated (also fixed WorkerProcessLauncher.md's 'six variables' — seven, MXGATEWAY_ALARM_ACK_CLIENT_NAME was missing). 8 Mac tests fail with launcher+validator reverted; FromEnvironment test fails on windev with the env read disabled. Evidence: windev x86 Release Worker build 0 warnings; Worker.Tests 757 passed / 12 skipped / 0 failed; Mac NonWindows.slnx 0 warnings, MxGateway.Tests 1402 passed / 2 skipped (re-run after rebase on main).