SIGUSR1 进程内重启后执行状态重置排查
针对热重启后任务卡死/状态残留,优先验证 SIGUSR1 后执行状态是否被清理,再决定是否切换全量重启。
GITHUBDiscovered 2026-02-13Author joeykrug
Prerequisites
- Gateway supports in-process restart flow and you can access runtime logs.
- You have a reproducible exec task that previously got stuck after restart.
Steps
- Start one long-running exec/process task and record its session id/state before restart.
- Trigger in-process restart and watch logs for stale execution state reset handling.
- After restart, poll the old session id and ensure no ghost-running state remains.
- Run a fresh exec task to validate scheduler/worker path is healthy.
Commands
openclaw gateway restartopenclaw logs --local-timeopenclaw gateway statusVerify
No stale task remains after restart, and new tasks execute without inheriting previous stuck state.
Caveats
- If restart happens during critical writes, still keep idempotency/compensation logic in application layer.
- PR detail page may require signed-in context for full diff review(需验证)。
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗