// troubleshooting guide · cockroachdb
CockroachDB High Memory, CPU or OOM Crash Fix
- Status
- Ongoing
- platforms:
- Self-hosted and CockroachDB Cloud
- updated:
- November 15, 2026
- reports:
- 4
- Method
- how we research
RUNBOOK · cockroachdb/out-of-memory-high-cpu4 FIXES
// quick answer
CockroachDB nodes crash with out-of-memory or run hot when the cache and SQL memory pools are not sized for the machine, or when queries use large in-memory sorts and joins.
Most likely fix: Size memory flags
How to fix it
// try these in order, the most common fix is first
FIX 1Size memory flags
- 01Start nodes with --cache=.25 --max-sql-memory=.25 (recommended for production)
- 02In Kubernetes, set limits and requests so the values match
Did this fix it?FIX 2Fix expensive queries
- 01Check SQL Activity for high memory statements
- 02Add indexes and LIMITs; avoid huge result sets
Did this fix it?FIX 3Limit connections
- 01Use a connection pool and cap max connections per node (guidance: about 4x vCPUs)
Did this fix it?FIX 4Scale
- 01Add nodes or vCPUs; schedule backups and schema changes off-peak
Did this fix it?
Symptoms
Nodes killed by OOM; memory climbs; CPU pinned at 100%; 'memory budget exceeded' errors.
Why it happens
- C-01--cache and --max-sql-memory left at defaults on a shared or containerized host
- C-02Large sorts, joins and aggregations in memory
- C-03Too many open connections
- C-04Heavy background jobs (backups, schema changes, CDC)
- C-05Container memory limits lower than the settings
// this guide also covers
- cockroachdb out of memory
- cockroachdb high memory usage
- cockroachdb high cpu
- cockroachdb memory budget exceeded
- cockroachdb oom killed
Still not working?
If CockroachDB keeps failing, you're not alone. See every CockroachDB 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 usOther CockroachDB errors
- CockroachDB 'restart transaction' Error (40001) Fix
- CockroachDB Cluster Throttled: License Expired or No Telemetry
- Why Is CockroachDB Slow? Slow Query Fixes
- CockroachDB Connection Refused / Cannot Connect Fix
- CockroachDB Node Down or Cluster Unavailable: Fix
- CockroachDB 'Not Supported' / Postgres Compatibility Errors Fix
- CockroachDB Cloud Bill Too High: How to Cut Costs
- How to Cancel or Downgrade CockroachDB Cloud