// 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
Share

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

  1. FIX 1Size memory flags

    1. 01Start nodes with --cache=.25 --max-sql-memory=.25 (recommended for production)
    2. 02In Kubernetes, set limits and requests so the values match
    Did this fix it?
  2. FIX 2Fix expensive queries

    1. 01Check SQL Activity for high memory statements
    2. 02Add indexes and LIMITs; avoid huge result sets
    Did this fix it?
  3. FIX 3Limit connections

    1. 01Use a connection pool and cap max connections per node (guidance: about 4x vCPUs)
    Did this fix it?
  4. FIX 4Scale

    1. 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 us

Watch CockroachDB Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other CockroachDB errors