openclaw - 💡(How to fix) Fix Gateway CPU spin causes Telegram replies to stall and status probe to time out [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72338Fetched 2026-04-27 05:31:23
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

The OpenClaw gateway can enter a high-CPU state where Telegram polling still appears to ingest updates, but the agent reply pipeline stalls and openclaw channels status --deep times out against the local loopback gateway. Restarting openclaw-gateway.service temporarily restores Telegram replies, but the gateway can return to high CPU shortly after restart.

I am intentionally omitting private identifiers, tokens, hostnames, absolute user paths, Telegram chat IDs, and session message contents from this report.

Root Cause

The gateway process remains alive but consumes high CPU, local status probes time out, and Telegram appears silent because received messages do not result in assistant replies.

Code Example

Checking channel status...
Gateway not reachable: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: <home>/.openclaw/openclaw.json
Bind: loopback
Gateway not reachable; showing config-only status.
Mode: local

- Telegram default: enabled, configured, token:<redacted>
- WhatsApp default: enabled, not configured

---

openclaw channels login --channel whatsapp --verbose

---

{
  "version": 1,
  "reason": "unhandled_rejection",
  "process": {
    "platform": "linux",
    "arch": "arm64",
    "node": "25.9.0"
  },
  "snapshot": {
    "count": 0,
    "events": []
  }
}
RAW_BUFFERClick to expand / collapse

Summary

The OpenClaw gateway can enter a high-CPU state where Telegram polling still appears to ingest updates, but the agent reply pipeline stalls and openclaw channels status --deep times out against the local loopback gateway. Restarting openclaw-gateway.service temporarily restores Telegram replies, but the gateway can return to high CPU shortly after restart.

I am intentionally omitting private identifiers, tokens, hostnames, absolute user paths, Telegram chat IDs, and session message contents from this report.

Environment

  • OpenClaw: 2026.4.24 (cbcfdf6)
  • Package: [email protected] from npm
  • OS: Linux aarch64 / Raspberry Pi kernel family
  • Gateway mode: local loopback systemd user service
  • Service ExecStart: /usr/bin/node .../openclaw/dist/index.js gateway --port 18789
  • Service Node: /usr/bin/node reports v24.14.1
  • Shell Node on PATH: v25.9.0
  • Channels configured: Telegram enabled; WhatsApp present but not configured during the latest status check

Symptoms

  • Telegram bot token and outbound send path work. The gateway had recent successful sendMessage events before the stall.
  • Incoming Telegram messages were written to the Telegram session, but no assistant response was appended afterward.
  • The gateway process was observed at roughly one full core of CPU shortly after restart, e.g. about 100-120% CPU and hundreds of MB RSS.
  • openclaw channels status --deep timed out against ws://127.0.0.1:18789 while the process was still running.
  • Restarting the gateway temporarily made Telegram responsive again.

Sanitized status output

Checking channel status...
Gateway not reachable: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: <home>/.openclaw/openclaw.json
Bind: loopback
Gateway not reachable; showing config-only status.
Mode: local

- Telegram default: enabled, configured, token:<redacted>
- WhatsApp default: enabled, not configured

Possibly related trigger

Before one stall, an interactive channel login command was launched through the agent/gateway path:

openclaw channels login --channel whatsapp --verbose

That child process remained running under the gateway and consumed significant CPU. Killing that child and restarting openclaw-gateway.service restored Telegram responses. However, after a clean restart the gateway again became CPU-heavy and local channels status --deep timed out, so this may be either:

  1. an interactive channel command leaving the gateway/session runtime in a bad state,
  2. a broader gateway event-loop CPU spin, or
  3. a recovery problem when replaying/resuming channel sessions after a stuck interactive run.

Stability dumps

There were multiple stability files generated with reason: unhandled_rejection around the same period. The dumps did not contain a useful stack in the visible snapshot; they only showed metadata like process platform/arch/node version and an empty event snapshot.

Example sanitized fields:

{
  "version": 1,
  "reason": "unhandled_rejection",
  "process": {
    "platform": "linux",
    "arch": "arm64",
    "node": "25.9.0"
  },
  "snapshot": {
    "count": 0,
    "events": []
  }
}

Expected behavior

The gateway should remain responsive to local status probes and should continue processing Telegram replies, or it should fail/restart cleanly if a channel runtime or interactive command gets stuck.

Actual behavior

The gateway process remains alive but consumes high CPU, local status probes time out, and Telegram appears silent because received messages do not result in assistant replies.

Suggested diagnostics / fixes

  • Add watchdog/health detection for event-loop stalls where the gateway process is alive but loopback status does not respond.
  • Ensure interactive channel login commands cannot block or starve the shared gateway reply pipeline.
  • Capture useful stack/context in unhandled_rejection stability dumps.
  • Consider isolating channel login subprocesses from the active Telegram agent session/runtime.

extent analysis

TL;DR

The OpenClaw gateway's high-CPU state and stalled agent reply pipeline may be resolved by addressing potential event-loop stalls, improving interactive channel login commands, and enhancing error handling.

Guidance

  • Investigate the cause of the high CPU usage by monitoring system resources and gateway performance after restarting the openclaw-gateway.service.
  • Verify if the issue is related to the interactive channel login command by testing it in isolation and checking if it consumes significant CPU resources.
  • Consider implementing a watchdog or health detection mechanism to detect event-loop stalls and restart the gateway if necessary.
  • Review the stability dumps to understand the unhandled_rejection errors and improve error handling to capture useful stack traces.

Example

No code snippet is provided as the issue lacks specific technical details.

Notes

The root cause of the issue is uncertain, and further investigation is required to determine the exact cause. The provided suggestions are based on the symptoms and expected behavior described in the issue.

Recommendation

Apply a workaround by implementing a watchdog or health detection mechanism to detect event-loop stalls and restart the gateway if necessary, as this may help mitigate the issue until a permanent fix is found.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The gateway should remain responsive to local status probes and should continue processing Telegram replies, or it should fail/restart cleanly if a channel runtime or interactive command gets stuck.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Gateway CPU spin causes Telegram replies to stall and status probe to time out [1 participants]