Fly.io Out of Memory (OOM Killed)
Quick answer
An OOM-killed Machine restarts and users see intermittent 502s. Confirm with fly machine status, then raise memory with fly scale memory.
Most likely fix: Confirm OOM
How to fix it
Try these in order — the most common fix is first.
1. Confirm OOM
- Run fly machine status <machine-id> and look for OOM kill events
- Inspect usage with free or htop inside fly ssh console
Did this fix it?2. Add memory
- Run fly scale memory 512 (or higher)
- For CPU-heavy apps choose a larger Machine size
Did this fix it?
Symptoms
Intermittent 502 errors, restarts, or a Machine that dies under load.
Why it happens
- Machine memory preset too small (shared-cpu-1x 256MB default size)
- Memory leak or large requests
- High CPU load alongside memory pressure
This guide also covers
- fly.io out of memory
- fly.io oom killed
- fly scale memory
Still not working?
If Fly.io keeps failing, you're not alone. See every Fly.io 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
All slow, laggy or resource-hungry guides →
DigitalOcean Droplet Out of Memory (OOM Killer) (DigitalOcean)
Other Fly.io errors
- Fly.io: The app is not listening on the expected address and will not be reachable by fly-proxy
- Fly.io 502 Bad Gateway
- Fly.io 503 Service Unavailable
- Fly.io Health Checks Failing
- Fly.io Machines Stopping or Not Starting (Auto-Stop)
- Fly.io Deploy Failed: Waiting for Depot Builder, Registry 401, Too Many Requests
- Fly.io Certificate Not Issuing or Custom Domain Not Working
- How to Cancel Fly.io: Delete an App, Stop Billing and Delete Your Account