Hi everyone! I need help with OpenClaw on DigitalOcean. My Discord bot keeps crashing due to a JavaScript heap out of memory error and has been offline for hours despite trying many fixes.
My setup:
- VPS: DigitalOcean 4GB RAM / 2 vCPU / Premium Intel
- OS: Ubuntu 24.04
- OpenClaw version: 2026.3.13
- Channel: Discord Bot API
- AI Provider: OpenRouter (mistralai/mistral-7b-instruct)
The problem:
OpenClaw service starts but crashes after about 20 seconds with this error: "FATAL ERROR: JavaScript heap out of memory". It has crashed and restarted over 39 times. My Discord bot JARVU.V1 remains permanently offline.
What I have tried:
- Added 2GB swap memory
- Set NODE_OPTIONS=--max-old-space-size=512
- Set NODE_OPTIONS=--max-old-space-size=3072
- Created systemd override.conf with memory settings
- Updated OpenClaw to latest version 2026.3.13
- Confirmed MemoryLimit=infinity in systemd
- Configured Discord token in both .env file and openclaw.json
- Set groupPolicy to open in openclaw.json
- Ran node directly with --max-old-space-size=3072
Nothing has worked. The bot shows offline on Discord permanently. Please help!