← Back to library

SIGUSR1 重启后 Telegram 双实例轮询冲突:排查热重载与重启叠加

问题/场景:执行 config.patch/SIGUSR1 后 Telegram provider 启动两次,长期出现 getUpdates 409。前置条件:至少 2 个 Telegram 账号,long-polling 模式。实施步骤:复现 restart 流程 → 检查日志 duplicate starting provider → 识别 hot-reload 与 full-restart 双路径叠加 → 增加单实例保护和旧轮询释放。关键命令:openclaw gateway restart。验证:每个账号仅启动一次且 409 消失。风险:若仅加重试不清理旧实例,冲突会永久持续。来源:Issue #20893。

GITHUBDiscovered 2026-02-19Author bencoremans
Prerequisites
  • Telegram channel uses long-polling getUpdates and has multiple configured accounts.
  • You can trigger SIGUSR1/config.patch restart and inspect full gateway lifecycle logs.
Steps
  1. Trigger restart path (config.patch or gateway restart) in a multi-account setup.
  2. Detect duplicate starting provider lines per account and immediate 409 conflicts.
  3. Confirm whether both config hot-reload and full restart each spawn polling loops.
  4. Apply guardrails: stop old pollers before restart completion and enforce one active poller per bot token.
Commands
openclaw gateway restart
openclaw gateway status
Verify

After restart, each Telegram account logs one provider startup and no repeating 409 conflict loop.

Caveats
  • Long-polling and webhook modes have different failure signatures; verify the active mode first.
  • Container orchestration auto-restart may mask duplicate-loop root cause(需验证).
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post