solution gateway critical macos linux windows

OpenClaw OOM crash loop after a Node/runtime mismatch

Fix OpenClaw gateway or openclaw-message OOM crash loops by updating to stable OpenClaw 2026.6.1, using Node 24 or Node 22.19+, and verifying your service actually uses the expected Node binary.

By CoClaw Team • • Updated June 8, 2026

Symptoms

One of these patterns:

  • The gateway enters a crash loop (LaunchAgent/systemd/pm2 keeps restarting it), and you see memory climb rapidly.
  • openclaw message send ... (or openclaw-message) fails with an OOM stack trace on smaller servers.

Common crash signatures:

  • FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
  • FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Cause

Older 2026.3-era reports pointed at Node.js v24.x as the trigger. Current stable OpenClaw 2026.6.1 now recommends Node.js 24 and supports Node.js 22.19+, so do not treat Node 24 itself as the current known-bad runtime.

The more likely current cause is a mismatch between your installed OpenClaw package, your service process, and the Node binary that service actually starts with.

Fix

1) Update to the stable OpenClaw release first

Use OpenClaw’s updater for normal updates:

openclaw update
openclaw --version

As of June 2026, npm latest is stable OpenClaw 2026.6.1. Beta/main can show newer 2026.6.x versions; only use them intentionally.

2) Align the runtime to Node.js 24 or Node.js 22.19+

On the machine that actually runs the gateway (or the CLI command):

node -v

Switch to Node 24 where available, or at least Node 22.19, using your preferred manager (nvm/fnm/asdf/apt/homebrew), then confirm:

node -v

Restart and re-test:

openclaw gateway restart

# If your symptom is CLI-only, re-run the exact command that was OOM'ing:
openclaw message send --channel <channel> --target <target> --message "test"

3) Make sure your service uses the same Node you tested

This is the most common “it still OOMs” trap:

  • your interactive shell uses Node 24 or Node 22.19+,
  • but launchd/systemd/Docker is still running a different Node.

Verify the gateway’s Node version in the service context (the exact method depends on how you run the gateway).

If you are unsure, the pragmatic check is: restart the service and inspect the process environment/path and the resolved Node binary.

4) If you are stuck on an older build: pin temporarily

This does not fix the underlying runtime mismatch, but it can be a short-term stability move while you migrate. Prefer the updater path over an npm overwrite:

openclaw update --tag <last-working-version>
openclaw --version

Verify

  • openclaw --version reports the stable version you intended (2026.6.1 unless you deliberately pinned).
  • node -v reports Node 24.x or Node 22.19+.
  • The gateway stays up for at least 10 minutes without entering an OOM restart loop.
  • openclaw gateway status / openclaw health works reliably.
  • If you were hitting the CLI symptom: the previously failing openclaw message send ... command completes.

Verification & references

  • Reviewed by:CoClaw Code Team
  • Last reviewed:June 8, 2026
  • Verified on: macOS · Linux · Windows
Want to explore more? Browse all solutions or ask in the Community Forum .
Report a problem

Related Resources

Node.js version mismatch (OpenClaw recommends Node 24)
Fix
Fix install/runtime failures caused by old Node.js versions by upgrading to Node 24 or Node 22.19+ and ensuring your shell/service uses the same Node.
Gateway restart is slow (`remote bin probe timed out` from a stale paired node)
Fix
Fix gateway restart/shutdown delays caused by unreachable or co-located paired nodes triggering repeated remote bin probes. Start with a minimal `gateway.nodes.denyCommands` workaround, then verify restart time returns to normal.
Windows native: node run hangs after printing PATH, or the runtime stays unstable
Fix
Stabilize native Windows setups where `openclaw node run` hangs after PATH output, the runtime behaves differently from your shell, or your real requirement is better served by WSL2.
Linux: gateway doesn't stay running (systemd service not installed)
Fix
If the gateway only runs in the foreground or stops after you close SSH, install/repair the systemd service and enable user lingering.
OpenClaw Remote Browser Setup: Gateway on One Machine, Browser on Another
Guide
Choose a stable remote-browser topology for OpenClaw, pin the right browser-capable node, and verify that gateway routing, relay startup, and browser takeover all land on the machine you intended.
OpenClaw on Native Windows: PATH, Scheduled Tasks, Node Host, and the Real Failure Modes
Guide
A field guide to running OpenClaw on native Windows without guesswork: separate shell, Scheduled Task, and node-host environments; fix PATH-driven failures cleanly; and know when WSL2 is the faster exit.