openclaw - 💡(How to fix) Fix Gateway RSS grows to 900MB+ rapidly on macOS MacBook Air after fresh restart [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#69977Fetched 2026-04-23 07:30:48
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
RAW_BUFFERClick to expand / collapse

Bug Report: Gateway Memory Bloat on macOS

Environment

  • OpenClaw version: 2026.4.20 (upgraded from 2026.4.15)
  • macOS: Darwin 24.6.0 (macOS 26 on MacBook Air)
  • RAM: 8GB MacBook Air
  • Node: v22.22.0

Problem

The openclaw-gateway process RSS grows to 900MB+ within minutes of a fresh restart, regardless of session count or dreaming state.

Timeline of Testing (2026-04-21)

StateRSSCPU
136 sessions, dreaming ON1,128 MB170%
Pruned to 3 sessions, dreaming ON573 MB → 901 MBclimbing
3 sessions, dreaming OFF526 MB (cold) → 908 MB (2 min later)52%
Just this Discord session (5.7MB jsonl)still 900MB+still high

What We Tried

  1. Aggressive session prune — reduced from 136 to 3 sessions, archived 129 jsonl files. Helped briefly (526MB cold) but climbed right back to 900MB.
  2. Disabled memory-core dreaming — no sustained improvement. Gateway still bloats to 900MB within minutes.
  3. Moved archive outside sessions dir — ensured no stale file scanning.
  4. openclaw doctor — killed by macOS OOM before it could complete (3 attempts).
  5. Multiple gateway restarts — same pattern each time: cold start ~500MB, climbs to 900MB+ within minutes.

2026.4.20 Fixes That Should Have Helped

  • Sessions/Maintenance: enforce the built-in entry cap and age prune by default, and prune oversized stores at load time so accumulated cron/executor session backlogs cannot OOM the gateway before the write path runs. (#69404)
  • Memory-core/dreaming: normalize sweep timestamps and reuse hashed narrative session keys for fallback cleanup so Dreaming narrative sub-sessions stop leaking. (#67023)

Despite these fixes, the gateway still bloats rapidly.

Active Plugins

  • memory-core (dreaming disabled during test)
  • memory-wiki (enabled, 7 syntheses, minimal data)
  • discord, telegram, voice-call
  • zai, google, stepfun, openai, kimi (disabled)

Impact

On an 8GB MacBook Air, 900MB+ RSS causes:

  • macOS killing child processes (openclaw doctor killed 3 times)
  • Gateway becomes unresponsive / control UI goes down
  • Memory watchdog triggers restarts, creating instability cycle

Expected Behavior

Gateway RSS should stabilize well under 750MB on a machine with only 3 active sessions and dreaming disabled.

Reproduction

  1. Fresh install of OpenClaw 2026.4.20 on macOS MacBook Air (8GB)
  2. Start gateway
  3. Observe RSS climb from ~500MB to 900MB+ within 2-5 minutes
  4. Continue using normally — RSS does not stabilize

extent analysis

TL;DR

The OpenClaw gateway's memory bloat issue on macOS may be related to an unresolved memory leak, despite recent fixes, and requires further investigation into plugin interactions and system resource utilization.

Guidance

  • Investigate the interaction between the memory-core and memory-wiki plugins, even with dreaming disabled, to determine if there's an unforeseen memory allocation issue.
  • Monitor system resources and plugin-specific logs to identify any patterns or spikes in memory usage that could indicate the source of the leak.
  • Consider temporarily disabling the memory-wiki plugin to assess its impact on memory usage, given its minimal data and 7 syntheses.
  • Review the fixes implemented in #69404 and #67023 to ensure they are correctly applied and functioning as intended, potentially revisiting the implementation details.

Example

No specific code snippet can be provided without further details on the plugin implementations or the exact changes made in the mentioned fixes.

Notes

The provided information suggests that the issue persists despite attempts to mitigate it through session pruning, disabling dreaming, and ensuring no stale file scanning. The fact that openclaw doctor is killed by macOS OOM before completion indicates a severe memory issue. The impact on an 8GB MacBook Air is significant, leading to instability and unresponsiveness.

Recommendation

Apply a workaround by closely monitoring and potentially disabling non-essential plugins to mitigate the memory bloat, as the root cause of the issue is not immediately clear and may require further development or patching to fully resolve.

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 Gateway RSS grows to 900MB+ rapidly on macOS MacBook Air after fresh restart [1 participants]