openclaw - 💡(How to fix) Fix v2026.5.20 — Gateway memory leak causing repeated crashes (6+ per day)

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…

Since upgrading to v2026.5.20 (installed May 21), the gateway crashes 4–6 times daily due to memory exhaustion. macOS kills the process via launchd (all restarts show source=launchd-handoff).

Root Cause

Since upgrading to v2026.5.20 (installed May 21), the gateway crashes 4–6 times daily due to memory exhaustion. macOS kills the process via launchd (all restarts show source=launchd-handoff).

Fix Action

Fix / Workaround

  • v2026.5.19 was stable — no crash pattern before upgrade
  • Attempted downgrade to v2026.5.19 but config version mismatch (config last written by OpenClaw 2026.5.20) required OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 — reverting was painful
  • Broken module reference logged post-upgrade: Cannot find module 'cleanup-CQawj5mF.js' (resolved after reinstall)
  • Workaround in place: daily 6am ET gateway restart cron to clear memory

Code Example

21:42:09 → rss=724 MiB  heap=391 MiB
21:42:39 → rss=724 MiB  heap=397 MiB
21:43:09 → rss=732 MiB  heap=407 MiB
21:43:39 → rss=740 MiB  heap=423 MiB  (+32 MiB heap in 90 seconds)
21:45:09 → rss=748 MiB  heap=416 MiB

---

[2026-05-21T14:59:12Z] restart attempt source=launchd-handoff
[2026-05-21T15:05:22Z] restart attempt source=launchd-handoff
[2026-05-21T15:11:00Z] restart attempt source=launchd-handoff
[2026-05-21T22:04:35Z] restart attempt source=launchd-handoff
[2026-05-21T22:25:13Z] restart attempt source=launchd-handoff
[2026-05-21T22:34:49Z] restart attempt source=launchd-handoff
[2026-05-21T22:39:53Z] restart attempt source=launchd-handoff
[2026-05-22T08:00:05Z] restart attempt source=launchd-handoff
[2026-05-22T12:07:47Z] restart attempt source=launchd-handoff

---

Events: 125/1000
Memory: rss=748 MiB heap=416 MiB maxRss=769 MiB pressure=0
RAW_BUFFERClick to expand / collapse

Summary

Since upgrading to v2026.5.20 (installed May 21), the gateway crashes 4–6 times daily due to memory exhaustion. macOS kills the process via launchd (all restarts show source=launchd-handoff).

Memory Growth — Observed in Real Time

21:42:09 → rss=724 MiB  heap=391 MiB
21:42:39 → rss=724 MiB  heap=397 MiB
21:43:09 → rss=732 MiB  heap=407 MiB
21:43:39 → rss=740 MiB  heap=423 MiB  (+32 MiB heap in 90 seconds)
21:45:09 → rss=748 MiB  heap=416 MiB

Max RSS reaches ~850–855 MiB before macOS kills the process. Gateway restarts via launchd but leaks again immediately from baseline.

Restart Log (May 21–22 only)

All restarts are source=launchd-handoff confirming OS-level kills, not clean crashes:

[2026-05-21T14:59:12Z] restart attempt source=launchd-handoff
[2026-05-21T15:05:22Z] restart attempt source=launchd-handoff
[2026-05-21T15:11:00Z] restart attempt source=launchd-handoff
[2026-05-21T22:04:35Z] restart attempt source=launchd-handoff
[2026-05-21T22:25:13Z] restart attempt source=launchd-handoff
[2026-05-21T22:34:49Z] restart attempt source=launchd-handoff
[2026-05-21T22:39:53Z] restart attempt source=launchd-handoff
[2026-05-22T08:00:05Z] restart attempt source=launchd-handoff
[2026-05-22T12:07:47Z] restart attempt source=launchd-handoff

Before v2026.5.20: restarts were rare (1–2 per week at most).

Stability Snapshot (fresh after restart)

Events: 125/1000
Memory: rss=748 MiB heap=416 MiB maxRss=769 MiB pressure=0

Previous session (before crash): Events: 1000/1000 · dropped=440 — 44% event drop rate at peak.

Triggers That Accelerate Crash

  • Image processing via WhatsApp (screenshots sent for analysis)
  • Heavy multi-tool sessions
  • WhatsApp 499/503 reconnect cycles holding buffers

Additional Context

  • v2026.5.19 was stable — no crash pattern before upgrade
  • Attempted downgrade to v2026.5.19 but config version mismatch (config last written by OpenClaw 2026.5.20) required OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 — reverting was painful
  • Broken module reference logged post-upgrade: Cannot find module 'cleanup-CQawj5mF.js' (resolved after reinstall)
  • Workaround in place: daily 6am ET gateway restart cron to clear memory

Environment

  • macOS 15, arm64 (Apple Silicon)
  • Node.js 22.22.2
  • OpenClaw 2026.5.20 (e510042)
  • 69 plugins loaded, 25 disabled
  • WhatsApp connected via Baileys

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…

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 v2026.5.20 — Gateway memory leak causing repeated crashes (6+ per day)