Opyntel

Out of memory on Render: what “Ran out of memory” means, and how to see it coming

On Render, out of memory shows in the events as Ran out of memory (used over 512MB) while running your code: your instance went over its instance type’s memory and was killed, often with exit status 137. Render restarts the instance. If it happens during startup, the deploy fails. If it keeps happening, the service turns unhealthy. For the general picture, see exit code 137 and OOM killed.

Why the Metrics tab disagrees

Render’s Metrics tab estimates memory at points in time, so a short spike can miss the graph. A common report on Render’s community forum is an out-of-memory event next to a graph that never came near the limit. Treat the event as the truth, and look for the work that ran just before it.

How to fix it

  1. Move up an instance type. The memory in the event message is your instance type’s limit.
  2. Cut workers. Lower WEB_CONCURRENCY or the Gunicorn worker count. Each worker holds its own copy of the app.
  3. Cap the runtime. For Node, set --max-old-space-size to about 75 percent of the instance’s memory.
  4. Run production builds. A development server, or a build step in the start command, can use far more memory than the app itself.
  5. Move heavy jobs to a background worker, so a spike there does not restart the web service.

What Render warns you about

Render emails or posts to Slack when a deploy fails, a service turns unhealthy or a disk passes 80 percent. It has no memory threshold alert, so the first message you get is about the failure itself.

How Opyntel warns you first

Opyntel reads your Render services through the Render API and shows memory as a share of each instance type’s limit, next to the rest of your services. It alerts when a service’s memory passes your threshold, by email, Slack or SMS depending on your plan. Out-of-memory restarts and failed deploys land on one activity timeline across every service.

FAQ

Render out-of-memory questions, answered

Restarts, memory differences and alerts.

Yes. The instance restarts, and a service that keeps failing to start can be suspended after repeated failures.

Production traffic, more workers, and a dev server or build running in the start command all add up.

Not from Render’s notifications, which cover failures and disk only. Opyntel alerts on memory while it is still climbing.

The alerts your platform doesn’t send.

One dashboard for everything you run, with the alerts your platforms leave out. Read-only, nothing to install in your apps.

See how it works