Docker Gateway keeps getting OOM-killed on a small VPS

Adapted community discussion: Paraphrased and condensed from an anonymized public OpenClaw Discord support conversation from March and April 2026. Technical guidance was reviewed for OpenClaw 2026.9.3.

My Docker Gateway keeps getting OOM-killed on a VPS with under 4 GB of RAM. The container limit started at 2 GB and is now 3 GB. I have five agents configured, and two or three active agents push memory over the cap. Heartbeats also use a provider whose free quota is exhausted, so retries appear to add more pressure. What should I change first?

I have seen similar container crashes for weeks. There are other memory reports, so I am unsure whether this is only sizing or a regression. It would be useful to separate those before assuming more RAM is the only answer.

There may be two overlapping issues. A host under 4 GB is tight for five agents plus heartbeats and retry bursts, while some older releases also had separate memory regressions. Start by checking the exact version:

openclaw --version
openclaw status --all

Remove any quota-exhausted provider from the always-on heartbeat and failover paths, reduce heartbeat frequency or pause it temporarily, and limit active work while testing. Leave enough memory for Linux and Docker outside the container cap. If the installed version matches a known regression, address the version issue before drawing conclusions from tuning alone.

My case is different: the container has 8 GB and four cores, but the process still runs out of memory roughly every half hour. That seems too large and too regular to explain as a tiny host alone.

Agreed. A larger container failing on that cadence points more strongly to a leak or regression path than simple undersizing. Test a minimal reproduction matrix: close Control UI tabs, pause browser tooling, use one channel, reduce heartbeats, and compare memory growth after each change. Keep automatic restart as temporary damage control, not a diagnosis.

We do not have one confirmed fix yet. The useful next result is which single feature changes the crash cadence, together with the exact OpenClaw version and a redacted memory or OOM record.