FATAL: the database system is in recovery mode
PostgreSQL crashed (often OOM-killed) and is replaying WAL to recover.
Seen on:
PostgreSQL
Meaning
When a backend process dies abnormally, the postmaster restarts all sessions and runs recovery. The PostgreSQL log shows which process was killed and why.
Common causes
- A backend killed by the OOM killer
- Server crash/power loss
- Storage errors
⚡ Quick fix
- Check the PostgreSQL log and dmesg for OOM kills
- Reduce work_mem/max_connections or add RAM
- Let recovery finish
Detailed fix by platform
Linux
dmesg -T | grep -i -E 'killed process|out of memory'
How to diagnose
- Cause — What terminated the backend?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026