Render Build or Service Out of Memory
Quick answer
Render builds and running services are killed when they exceed memory (exit code 137 or an out of memory message). Lower memory use, set heap limits or move to a bigger instance.
Most likely fix: Reduce memory in the build
How to fix it
Try these in order — the most common fix is first.
1. Reduce memory in the build
- Check the build log for the step that dies
- Build locally or in CI and deploy a prebuilt Docker image
- Disable source maps or parallel build workers
Did this fix it?2. Tune runtime memory
- Set a lower WEB_CONCURRENCY for Gunicorn or Rails workers
- Node: set NODE_OPTIONS=--max-old-space-size below the instance RAM
Did this fix it?3. Upgrade the instance
- Settings > Instance Type, choose a plan with more RAM
- Render's docs recommend 2 GB or more for JVM apps and Node AI tools like n8n
Did this fix it?
Symptoms
Build fails with an out of memory message, or the service restarts repeatedly with "Ran out of memory" / exit 137.
Why it happens
- Build tooling (webpack, Next.js, large installs) uses more memory than the pipeline allows
- Free and Starter instances have only 512 MB RAM
- Memory leak that grows until the instance is killed
- High WEB_CONCURRENCY in Python or Ruby apps
- Node.js heap limit not matched to the instance
This guide also covers
- render build out of memory
- render ran out of memory
- render exit code 137
Still not working?
If Render keeps failing, you're not alone. See every Render problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other Render errors
- Render Free Instance Spins Down: Slow First Request
- Render "No Open Ports Detected" Deploy Error
- Render Build Failed: Exited With Status 1
- Render Free Postgres Expired or Deleted
- Render 502 Bad Gateway Error
- Render Custom Domain Verification or SSL Pending
- Render Health Check Failed or Deploy Timed Out
- Render Free Service Suspended: 750 Hours Used Up