OpenClaw out-of-memory (OOM)
An OOM kill happens when the OpenClaw process exceeds available RAM or VRAM, so the OS terminates it before it can respond, often with no error in the chat. Switch to a smaller or more quantized model, lower maxContextTokens (e.g. 32000) and maxIterations (e.g. 15), and free memory, add swap, or use a host with more RAM.
Likely cause
The model is too large for the available RAM or VRAM, so the OS kills the process before it can respond.
The fix
- 1 Switch to a smaller or more heavily quantized model.
- 2 Lower maxContextTokens (e.g. 32000) and maxIterations (e.g. 15) in your config.
- 3 Free RAM / VRAM or add swap, or run on a host with more memory.
ollama pull qwen2.5:7b-instruct-q4_K_MHit a different error?
Paste any agent error and get the cause and fix in seconds.
Frequently asked questions
There's no error message, the agent just died. How do I confirm it was OOM?
Check the system journal for 'Out of memory' or 'oom-kill' entries (dmesg | grep -i oom). In Docker, check the container status for 'OOMKilled: true'. The process is killed before it can log anything itself.
It ran fine for days, then crashed. Why now?
That pattern means your baseline memory sits close to the limit and a burst of activity pushed it over. The conversation buffer growing unchecked is the most common cause. Cap maxContextTokens and prune unused skills to lower the baseline.
How much RAM do I actually need?
A 1GB VPS can't run OpenClaw reliably and a 2GB box only works with careful config. For a production agent with a few skills, use 4GB+. If you also run a local model on the same host, it competes for the same memory.
Stop firefighting agent errors
Decoding errors one at a time is the manual version of what BetterClaw automates. Run your OpenClaw agents hosted with managed models, retries and config validation built in.
$19/month per agent · BYOK · 7-day money-back guarantee
