<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CockroachDB Operations Guides on Netdata</title><link>https://www.netdata.cloud/guides/cockroachdb/</link><description>Recent content in CockroachDB Operations Guides on Netdata</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.netdata.cloud/guides/cockroachdb/index.xml" rel="self" type="application/rss+xml"/><item><title>CockroachDB /health?ready=1: load balancer checks, draining, and impaired nodes</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-health-ready-endpoint/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-health-ready-endpoint/</guid><description>&lt;h1 id="cockroachdb-healthready1-load-balancer-checks-draining-and-impaired-nodes">CockroachDB /health?ready=1: load balancer checks, draining, and impaired nodes&lt;/h1>
&lt;p>CockroachDB exposes a readiness endpoint at &lt;code>GET /health?ready=1&lt;/code> on its HTTP port (default 8080). Load balancers and Kubernetes readiness probes use it to decide whether to route SQL traffic to a node. The node returns HTTP 200 when ready and HTTP 503 when not. This signal separates &amp;ldquo;process is alive&amp;rdquo; from &amp;ldquo;this node should receive client connections.&amp;rdquo;&lt;/p>
&lt;p>The most common operator mistake is using a plain TCP check against the SQL port (26257) or the plain &lt;code>/health&lt;/code> endpoint instead of &lt;code>/health?ready=1&lt;/code>. A TCP check succeeds as long as the port is listening, telling you nothing about whether the node is draining, write-stalled, or GC-thrashing. The plain &lt;code>/health&lt;/code> endpoint returns 200 whenever the process is running, regardless of draining state. Neither is safe for routing decisions.&lt;/p></description></item><item><title>CockroachDB admission control throttling: queue depth, store-write, and capacity headroom</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-admission-control-throttling/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-admission-control-throttling/</guid><description>&lt;h1 id="cockroachdb-admission-control-throttling-queue-depth-store-write-and-capacity-headroom">CockroachDB admission control throttling: queue depth, store-write, and capacity headroom&lt;/h1>
&lt;p>When admission control starts queuing requests, p99 latency climbs while throughput stays flat or degrades. The cluster hasn&amp;rsquo;t crashed, disks aren&amp;rsquo;t full, and CPU may not be saturated. An internal flow-control system decided the node or store is at capacity and started holding work back to protect itself.&lt;/p>
&lt;p>Admission control (v21.2+, enabled by default since v22.1) &lt;!-- TODO: verify store-write queue default-enablement version; KV was v22.1, store-write may have come later --> regulates work through five queues: &lt;code>kv&lt;/code>, &lt;code>sql-kv-response&lt;/code>, &lt;code>sql-sql-response&lt;/code>, &lt;code>elastic-cpu&lt;/code>, and &lt;code>store-write&lt;/code>. Each gates a different class of work with distinct triggers. Knowing which queue is deep and why is the difference between a five-minute diagnosis and a multi-hour investigation into &amp;ldquo;why is the database slow.&amp;rdquo;&lt;/p></description></item><item><title>CockroachDB backup job failures: RPO breaches, duration trends, and stuck jobs</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-backup-job-failures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-backup-job-failures/</guid><description>&lt;h1 id="cockroachdb-backup-job-failures-rpo-breaches-duration-trends-and-stuck-jobs">CockroachDB backup job failures: RPO breaches, duration trends, and stuck jobs&lt;/h1>
&lt;p>CockroachDB scheduled backups run through the internal jobs system, visible via &lt;code>crdb_internal.jobs&lt;/code> (backed by &lt;code>system.jobs&lt;/code>). When a scheduled backup fails silently, stalls indefinitely, or grows so slowly that it cannot complete within its interval, your recovery point objective (RPO) is at risk. The failure is insidious: backups often appear healthy until you realize the last successful completion was 36 hours ago.&lt;/p></description></item><item><title>CockroachDB certificate expired: TLS handshake failures and online rotation</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-certificate-expired/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-certificate-expired/</guid><description>&lt;h1 id="cockroachdb-certificate-expired-tls-handshake-failures-and-online-rotation">CockroachDB certificate expired: TLS handshake failures and online rotation&lt;/h1>
&lt;p>CockroachDB uses mutual TLS for every connection: node-to-node, client-to-node, and admin UI. There is no plaintext fallback and no grace period. When a certificate expires, affected connections fail immediately.&lt;/p>
&lt;p>Node certificate expiry prevents nodes from completing TLS handshakes with each other, which can look like a network partition or quorum loss. Client certificate expiry prevents applications from connecting. CA certificate expiry invalidates the entire trust chain at once, breaking every connection simultaneously.&lt;/p></description></item><item><title>CockroachDB changefeed lag: changefeed_max_behind_nanos and the GC time bomb</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-changefeed-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-changefeed-lag/</guid><description>&lt;h1 id="cockroachdb-changefeed-lag-changefeed_max_behind_nanos-and-the-gc-time-bomb">CockroachDB changefeed lag: changefeed_max_behind_nanos and the GC time bomb&lt;/h1>
&lt;p>Changefeed lag in CockroachDB starts as a consumer latency problem and ends as a disk space emergency. The &lt;code>changefeed_max_behind_nanos&lt;/code> gauge measures how far behind your CDC feeds have fallen, but the real danger is what follows: a stalled changefeed holds a protected timestamp that prevents MVCC garbage collection, and dead data accumulates silently until the disk fills. The cluster appears healthy from the SQL side. Queries are fast, nodes are up, ranges are available. But every deleted row and every overwritten value stays on disk because GC cannot reclaim the space.&lt;/p></description></item><item><title>CockroachDB clock skew cascade: how shared NTP drift causes quorum loss</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-skew-cascade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-skew-cascade/</guid><description>&lt;h1 id="cockroachdb-clock-skew-cascade-how-shared-ntp-drift-causes-quorum-loss">CockroachDB clock skew cascade: how shared NTP drift causes quorum loss&lt;/h1>
&lt;p>Multiple CockroachDB nodes crashed overnight. The logs show &amp;ldquo;clock synchronization error: this node is more than 500ms away from at least half of the known nodes.&amp;rdquo; You restart them, and they crash again. Some ranges are now unavailable. The cluster is losing quorum.&lt;/p>
&lt;p>A shared NTP failure caused multiple nodes to drift past CockroachDB&amp;rsquo;s self-termination threshold in quick succession. Single-node clock skew is bad but recoverable. Multi-node skew from a shared NTP source can take down quorum faster than the cluster can heal.&lt;/p></description></item><item><title>CockroachDB clock synchronization error: this node is more than 500ms away from at least half of the known nodes</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-synchronization-error-500ms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-synchronization-error-500ms/</guid><description>&lt;h1 id="cockroachdb-clock-synchronization-error-this-node-is-more-than-500ms-away-from-at-least-half-of-the-known-nodes">CockroachDB clock synchronization error: this node is more than 500ms away from at least half of the known nodes&lt;/h1>
&lt;p>You see this fatal log line on a CockroachDB node:&lt;/p>
&lt;pre tabindex="0">&lt;code>clock synchronization error: this node is more than 500ms away from at least half of the known nodes
&lt;/code>&lt;/pre>&lt;p>The process exits immediately. If the node is managed by systemd, Kubernetes, or a process supervisor, it restarts and crashes again. The crash-loop continues until the clock problem is fixed.&lt;/p></description></item><item><title>CockroachDB clock_offset_meannanos high: catching clock drift before self-termination</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-offset-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-clock-offset-high/</guid><description>&lt;h1 id="cockroachdb-clock_offset_meannanos-high-catching-clock-drift-before-self-termination">CockroachDB clock_offset_meannanos high: catching clock drift before self-termination&lt;/h1>
&lt;p>&lt;code>clock_offset_meannanos&lt;/code> measures the mean clock offset between a CockroachDB node and its peers. When it climbs, you are on a path that ends in silent performance degradation from widened read uncertainty windows, or a node self-terminating to preserve data consistency.&lt;/p>
&lt;p>The thresholds are unforgiving. CockroachDB uses a default &lt;code>--max-offset&lt;/code> of 500ms. A node self-terminates when its mean offset exceeds 80% of that value (400ms) relative to a majority of peers. But a constant 200ms offset, stable and below any threshold, still doubles the uncertainty interval for every read. Transactions silently restart more often, P99 read latency creeps up, and nobody suspects the clock.&lt;/p></description></item><item><title>CockroachDB compaction backlog growing: when Pebble can't keep pace with writes</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-compaction-backlog-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-compaction-backlog-growing/</guid><description>&lt;h1 id="cockroachdb-compaction-backlog-growing-when-pebble-cant-keep-pace-with-writes">CockroachDB compaction backlog growing: when Pebble can&amp;rsquo;t keep pace with writes&lt;/h1>
&lt;p>Pebble&amp;rsquo;s background compaction threads sometimes fall behind foreground writes. In CockroachDB, this does not cause immediate failure. SSTable files accumulate in Level 0 and the compaction queue, read amplification rises, and the node drifts toward write stalls. Because the database continues to serve traffic, the backlog is easy to miss until it becomes severe.&lt;/p>
&lt;p>The earliest visible sign is a gentle upward trend in Level 0 file counts or marked-for-compaction files over hours. These metrics fluctuate with workload bursts, but a sustained upward slope means the store is consuming headroom. Healthy operation requires compaction throughput at least twice the write ingestion rate. Less than that leaves no margin for bursts, MVCC garbage collection, or rebalancing.&lt;/p></description></item><item><title>CockroachDB connection storm after failover: reconnect stampedes and surviving-node overload</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-connection-storm-after-failover/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-connection-storm-after-failover/</guid><description>&lt;h1 id="cockroachdb-connection-storm-after-failover-reconnect-stampedes-and-surviving-node-overload">CockroachDB connection storm after failover: reconnect stampedes and surviving-node overload&lt;/h1>
&lt;p>When a CockroachDB node dies, every client connected to it reconnects at the same time. Without jittered backoff in client connection pools, hundreds or thousands of new connections land on the surviving nodes within seconds. The survivors are not overwhelmed by additional query load. They are overwhelmed by connection overhead: per-connection goroutines, session memory allocations, TLS handshakes, and SQL planner initialization.&lt;/p></description></item><item><title>CockroachDB consistency check failed: checksum mismatches and confirmed corruption</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-data-consistency-check-failure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-data-consistency-check-failure/</guid><description>&lt;h1 id="cockroachdb-consistency-check-failed-checksum-mismatches-and-confirmed-corruption">CockroachDB consistency check failed: checksum mismatches and confirmed corruption&lt;/h1>
&lt;p>When the background consistency checker detects a checksum mismatch between replicas of a range, CockroachDB logs a fatal error and the node terminates. This is not a transient condition. The database is telling you that data integrity is compromised.&lt;/p>
&lt;p>The definitive message: &amp;ldquo;consistency check failed with N inconsistent replicas&amp;rdquo; or a Pebble-level &amp;ldquo;checksum mismatch&amp;rdquo; error. Both originate from CockroachDB&amp;rsquo;s consistency checker subsystem, not from unrelated log noise. This article covers the failure mechanism, the recovery path, and the signals that help you scope the damage.&lt;/p></description></item><item><title>CockroachDB context deadline exceeded: timeouts, slow ranges, and overload</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-context-deadline-exceeded/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-context-deadline-exceeded/</guid><description>&lt;h1 id="cockroachdb-context-deadline-exceeded-timeouts-slow-ranges-and-overload">CockroachDB context deadline exceeded: timeouts, slow ranges, and overload&lt;/h1>
&lt;p>&amp;ldquo;context deadline exceeded&amp;rdquo; tells you something is slow. It does not tell you what. The same error appears whether a leaseholder is overloaded, a network path is congested, L0 sublevels are climbing past write-stall territory, or the application set a 2-second statement timeout on a query that normally takes 50 milliseconds.&lt;/p>
&lt;p>Treat the error as a symptom, not a diagnosis. The diagnostic question is: which layer is slow?&lt;/p></description></item><item><title>CockroachDB CPU saturation: Raft ticking, SQL execution, and the per-node ceiling</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-cpu-saturation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-cpu-saturation/</guid><description>&lt;h1 id="cockroachdb-cpu-saturation-raft-ticking-sql-execution-and-the-per-node-ceiling">CockroachDB CPU saturation: Raft ticking, SQL execution, and the per-node ceiling&lt;/h1>
&lt;p>CockroachDB is CPU-hungry by design. Every range runs its own Raft state machine. Every SQL statement parses, plans, and executes through Go. Compaction, encryption-at-rest, and checksumming all burn cycles. When CPU saturates, the failure mode is not a clean slowdown: Raft heartbeats get delayed, admission control starts queuing, GC pauses lengthen, and the node risks losing liveness. The cluster average can look healthy while one leaseholder melts.&lt;/p></description></item><item><title>CockroachDB detecting hot ranges: per-range QPS, CPU asymmetry, and the Hot Ranges page</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-detecting-hot-ranges/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-detecting-hot-ranges/</guid><description>&lt;h1 id="cockroachdb-detecting-hot-ranges-per-range-qps-cpu-asymmetry-and-the-hot-ranges-page">CockroachDB detecting hot ranges: per-range QPS, CPU asymmetry, and the Hot Ranges page&lt;/h1>
&lt;p>Hot ranges are the most common performance bottleneck in CockroachDB that does not surface in aggregate metrics. The leaseholder model routes all reads and writes for a range through a single node. When one range receives disproportionate traffic, that node saturates while the rest of the cluster idles. The cluster-wide CPU average looks healthy. The per-node breakdown tells a different story.&lt;/p></description></item><item><title>CockroachDB disk space running out: capacity_available trends and the 20% rule</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-disk-space-running-out/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-disk-space-running-out/</guid><description>&lt;h1 id="cockroachdb-disk-space-running-out-capacity_available-trends-and-the-20-rule">CockroachDB disk space running out: capacity_available trends and the 20% rule&lt;/h1>
&lt;p>When a CockroachDB store runs out of disk space, the node cannot accept writes, cannot compact its LSM tree (the operation that would reclaim space), and enters a downward spiral that typically requires operator intervention. The &lt;code>capacity_available&lt;/code> metric tracks remaining free space per store, but raw free space alone does not tell the full story. MVCC garbage, protected timestamps, compaction space amplification, and replica rebalancing all consume space faster than headline data growth suggests.&lt;/p></description></item><item><title>CockroachDB disk stall detected: storage_disk_stalled and node self-termination</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-disk-stall-detected/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-disk-stall-detected/</guid><description>&lt;h1 id="cockroachdb-disk-stall-detected-storage_disk_stalled-and-node-self-termination">CockroachDB disk stall detected: storage_disk_stalled and node self-termination&lt;/h1>
&lt;p>When &lt;code>storage_disk_stalled&lt;/code> goes nonzero on a CockroachDB node, the Pebble storage engine has detected that disk I/O is no longer completing within the expected time window. The node is on a countdown to self-termination. This is not a performance degradation warning. It is a safety mechanism preparing to fire.&lt;/p>
&lt;p>CockroachDB writes every committed transaction through a write-ahead log (WAL). The WAL fsync is on the critical path for every write: Raft cannot acknowledge a commit until the log entry is persisted to disk. If that fsync blocks for long enough, the node cannot process Raft heartbeats, cannot commit writes, and cannot renew its liveness record. Rather than continue operating in a state that could produce data inconsistency, CockroachDB terminates the process.&lt;/p></description></item><item><title>CockroachDB error 53200: SQL memory budget exhausted and query rejection</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-memory-budget-53200/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-memory-budget-53200/</guid><description>&lt;h1 id="cockroachdb-error-53200-sql-memory-budget-exhausted-and-query-rejection">CockroachDB error 53200: SQL memory budget exhausted and query rejection&lt;/h1>
&lt;p>Error 53200 is CockroachDB&amp;rsquo;s PostgreSQL-compatible signal that the per-node SQL memory budget has run out. Applications see SQLSTATE 53200 (&amp;ldquo;insufficient resources&amp;rdquo;) with text such as &amp;ldquo;memory budget exceeded&amp;rdquo; and byte counts showing what was requested, what is allocated, and what the budget allows.&lt;/p>
&lt;p>The SQL memory budget is enforced per-node, bounded by &lt;code>--max-sql-memory&lt;/code> (default 25% of system RAM). When a node&amp;rsquo;s SQL execution layer exhausts its budget, queries on that node either spill to temporary disk storage (slow) or are rejected outright with 53200. One large analytical query on a single gateway node can starve every other session connected to that node, even if the rest of the cluster has memory to spare.&lt;/p></description></item><item><title>CockroachDB file descriptor exhaustion: SSTables, connections, and ulimit</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-file-descriptor-exhaustion/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-file-descriptor-exhaustion/</guid><description>&lt;h1 id="cockroachdb-file-descriptor-exhaustion-sstables-connections-and-ulimit">CockroachDB file descriptor exhaustion: SSTables, connections, and ulimit&lt;/h1>
&lt;p>When CockroachDB hits its file descriptor limit, multiple subsystems fail at once. New SQL client connections are refused. SSTable file opens fail with I/O errors. Inter-node gRPC connections fail, destabilizing Raft consensus. The node may crash, stall, or refuse to start. In the logs you will see &amp;ldquo;too many open files&amp;rdquo; errors and, if the limit is below the startup minimum, the message &amp;ldquo;open file descriptor limit of X is under the minimum required Y&amp;rdquo;.&lt;/p></description></item><item><title>CockroachDB Go GC pauses high: when garbage collection threatens Raft heartbeats</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-go-gc-pauses-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-go-gc-pauses-high/</guid><description>&lt;h1 id="cockroachdb-go-gc-pauses-high-when-garbage-collection-threatens-raft-heartbeats">CockroachDB Go GC pauses high: when garbage collection threatens Raft heartbeats&lt;/h1>
&lt;p>GC pause time spiking, node liveness flapping, lease transfers churning. SQL latency oscillates between acceptable and terrible. The cluster is alive but unstable, and the oscillation pattern is the tell.&lt;/p>
&lt;p>CockroachDB runs on the Go runtime, which performs stop-the-world garbage collection pauses. When those pauses grow long enough, they block the Raft heartbeat loop. The node stops responding to heartbeats for the duration of the pause. If the pause is long enough, the cluster declares the node dead and redistributes its leases. Then the pause ends, the node recovers, leases come back, the heap grows again, and the cycle repeats.&lt;/p></description></item><item><title>CockroachDB hot range bottleneck: one leaseholder saturated while the cluster idles</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-hot-range-bottleneck/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-hot-range-bottleneck/</guid><description>&lt;h1 id="cockroachdb-hot-range-bottleneck-one-leaseholder-saturated-while-the-cluster-idles">CockroachDB hot range bottleneck: one leaseholder saturated while the cluster idles&lt;/h1>
&lt;p>One node runs hot while the rest of the cluster idles. CPU on that node is 80%+, but others hover around 20-30%. SQL latency is elevated, but only for specific tables. Transaction retry rates climb with &lt;code>writetooold&lt;/code> as the dominant restart cause. No range is unavailable, no node has lost liveness, and disk I/O is within normal bounds. The cluster has aggregate capacity, but a single range is funneling all its traffic through one leaseholder.&lt;/p></description></item><item><title>CockroachDB intent accumulation cascade: abandoned transactions and intentcount growth</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-intent-accumulation-cascade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-intent-accumulation-cascade/</guid><description>&lt;h1 id="cockroachdb-intent-accumulation-cascade-abandoned-transactions-and-intentcount-growth">CockroachDB intent accumulation cascade: abandoned transactions and intentcount growth&lt;/h1>
&lt;p>When &lt;code>intentcount&lt;/code> and &lt;code>intentbytes&lt;/code> climb and refuse to come down, your cluster is accumulating unresolved write intents from transactions that never committed or rolled back. Every subsequent transaction touching those keys must stop, resolve the intent, then proceed. At scale, the cluster spends more CPU and I/O resolving old intents than executing new work.&lt;/p>
&lt;p>This is the intent accumulation cascade. It is one of CockroachDB&amp;rsquo;s subtler failure modes because the cluster looks healthy on infrastructure metrics: nodes are live, ranges are available, disk I/O is within bounds. The damage shows up in transaction latency and throughput, not in availability signals.&lt;/p></description></item><item><title>CockroachDB LSM compaction death spiral: L0 sublevels, read amplification, and write stalls</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-lsm-compaction-death-spiral/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-lsm-compaction-death-spiral/</guid><description>&lt;h1 id="cockroachdb-lsm-compaction-death-spiral-l0-sublevels-read-amplification-and-write-stalls">CockroachDB LSM compaction death spiral: L0 sublevels, read amplification, and write stalls&lt;/h1>
&lt;p>SQL P99 latency jumps from milliseconds to seconds. KV write latency climbs. Nodes transfer leases. Logs show Pebble write stall messages. This is the LSM compaction death spiral: writes outpace the storage engine&amp;rsquo;s ability to compact data from Level 0 down the LSM tree. L0 sublevels stack up, read amplification rises, and the node eventually stalls writes to protect itself. By the time write stalls appear, the node is already at risk of losing Raft leases and appearing partially unavailable. This guide shows how to diagnose the spiral, stop it, and prevent it.&lt;/p></description></item><item><title>CockroachDB memory pressure, GC thrashing, and Raft liveness failure</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-memory-gc-liveness-thrash/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-memory-gc-liveness-thrash/</guid><description>&lt;h1 id="cockroachdb-memory-pressure-gc-thrashing-and-raft-liveness-failure">CockroachDB memory pressure, GC thrashing, and Raft liveness failure&lt;/h1>
&lt;p>A CockroachDB node loses liveness in a repeating pattern: it drops out, the cluster redistributes its leases, it recovers, reacquires leases, then drops again. Each cycle lasts seconds to minutes. Application queries see intermittent timeouts, ambiguous results, and latency spikes that correlate with the node&amp;rsquo;s oscillation. The DB Console shows the node flapping between live and not-live states.&lt;/p>
&lt;p>This is the memory pressure to GC thrashing to Raft liveness failure cascade. The Go runtime heap grows until garbage collection pauses become long enough to prevent the node from renewing its liveness heartbeat. Once the heartbeat interval lapses, the cluster marks the node dead and moves its leases. When GC completes and memory is freed, the node recovers and reacquires leases, restarting the cycle.&lt;/p></description></item><item><title>CockroachDB monitoring checklist: the signals every production cluster needs</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-monitoring-checklist/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-monitoring-checklist/</guid><description>&lt;h1 id="cockroachdb-monitoring-checklist-the-signals-every-production-cluster-needs">CockroachDB monitoring checklist: the signals every production cluster needs&lt;/h1>
&lt;p>CockroachDB layers SQL execution on a replicated KV store backed by Pebble LSM trees, Raft consensus, and MVCC concurrency control. Each subsystem has distinct failure modes, and interactions between them create cascades that single-signal monitoring cannot catch. A cluster can show healthy CPU, adequate disk space, and sub-millisecond SQL latency while L0 sublevels climb toward write stalls or clock offset drifts toward the self-termination threshold.&lt;/p></description></item><item><title>CockroachDB monitoring maturity model: from survival to expert</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-monitoring-maturity-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-monitoring-maturity-model/</guid><description>&lt;h1 id="cockroachdb-monitoring-maturity-model-from-survival-to-expert">CockroachDB monitoring maturity model: from survival to expert&lt;/h1>
&lt;p>CockroachDB failures rarely announce themselves through a single metric. A slow disk turns into L0 compaction debt, which stalls writes, which drops Raft proposals, which makes ranges unavailable. A drifting clock raises transaction retry rates long before any node self-terminates. To run this database safely, you need layered observability that matches the system&amp;rsquo;s own layers: storage engine, Raft replication, distributed SQL, and transaction execution.&lt;/p></description></item><item><title>CockroachDB MVCC garbage growing: tombstones, GC lag, and silent disk growth</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-mvcc-garbage-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-mvcc-garbage-growing/</guid><description>&lt;h1 id="cockroachdb-mvcc-garbage-growing-tombstones-gc-lag-and-silent-disk-growth">CockroachDB MVCC garbage growing: tombstones, GC lag, and silent disk growth&lt;/h1>
&lt;p>MVCC garbage accumulation produces no errors, no latency spikes, and no user-visible symptoms until the disk fills. By then, you may be hours away from a compaction death spiral that takes the node or cluster offline.&lt;/p>
&lt;p>CockroachDB retains old MVCC versions of every key until garbage collection removes them after the GC TTL window (default 25 hours). Deletes and updates create tombstones: markers that a key was removed at a specific timestamp. These tombstones persist in the LSM tree until MVCC GC runs and Pebble compaction physically removes them downstream. If anything blocks that cleanup, dead data accumulates silently.&lt;/p></description></item><item><title>CockroachDB node liveness failure: heartbeats, lease redistribution, and flapping</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-node-liveness-failure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-node-liveness-failure/</guid><description>&lt;h1 id="cockroachdb-node-liveness-failure-heartbeats-lease-redistribution-and-flapping">CockroachDB node liveness failure: heartbeats, lease redistribution, and flapping&lt;/h1>
&lt;p>Lease transfer spikes, briefly unavailable ranges, and client errors such as ambiguous results or connection resets indicate node liveness failure. In the logs, nodes transition to not-live and back within seconds. When the cluster decides a node cannot renew its liveness heartbeat, it redistributes leases. If the node recovers fast enough to renew but not fast enough to stay healthy, it flaps: an oscillating state more destructive than a clean outage because it repeatedly interrupts in-flight work and prevents stable failover.&lt;/p></description></item><item><title>CockroachDB out of memory: sys_rss, --cache, --max-sql-memory, and the OOM killer</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-out-of-memory-oom/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-out-of-memory-oom/</guid><description>&lt;h1 id="cockroachdb-out-of-memory-sys_rss---cache---max-sql-memory-and-the-oom-killer">CockroachDB out of memory: sys_rss, &amp;ndash;cache, &amp;ndash;max-sql-memory, and the OOM killer&lt;/h1>
&lt;p>A CockroachDB node disappears. No graceful shutdown, no drain sequence, no error in the SQL layer. The process is gone, and &lt;code>dmesg&lt;/code> shows the kernel OOM killer selected it. Or in Kubernetes, the pod restarts with reason &lt;code>OOMKilled&lt;/code>.&lt;/p>
&lt;p>The root cause is almost always a mismatch between what CockroachDB thinks it can allocate and what the container or host actually allows. CockroachDB partitions its memory into two manually-sized pools: the Pebble block cache (&lt;code>--cache&lt;/code>) and the SQL execution budget (&lt;code>--max-sql-memory&lt;/code>). The Go garbage collector only manages the Go heap. CGo allocations, primarily the Pebble block cache and memtables, are manually managed. When the sum of these pools plus runtime overhead exceeds the container or host limit, the OOM killer intervenes.&lt;/p></description></item><item><title>CockroachDB Pebble write stalls: when the storage engine refuses writes</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-pebble-write-stalls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-pebble-write-stalls/</guid><description>&lt;h1 id="cockroachdb-pebble-write-stalls-when-the-storage-engine-refuses-writes">CockroachDB Pebble write stalls: when the storage engine refuses writes&lt;/h1>
&lt;p>When application writes time out or return ambiguous errors, check CockroachDB logs for &lt;code>pebble: write stall&lt;/code> and watch &lt;code>storage_write_stalls&lt;/code>. Pebble pauses writes to a store when Level 0 compaction debt exceeds safe thresholds. Until compaction drains L0, that store cannot accept new writes.&lt;/p>
&lt;p>Write stalls are the most severe storage signal in CockroachDB. A brief stall during bulk loading may be harmless, but sustained stalls at one per second mean the node cannot meet its Raft obligations. The node may still serve reads, but it can lose Raft leadership because it cannot append log entries. That cascades into lease transfers and temporary range unavailability.&lt;/p></description></item><item><title>CockroachDB protected timestamp GC stall: stalled changefeeds that silently fill the disk</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-protected-timestamp-gc-stall/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-protected-timestamp-gc-stall/</guid><description>&lt;h1 id="cockroachdb-protected-timestamp-gc-stall-stalled-changefeeds-that-silently-fill-the-disk">CockroachDB protected timestamp GC stall: stalled changefeeds that silently fill the disk&lt;/h1>
&lt;p>Disk space is growing on your CockroachDB cluster and nothing explains it. &lt;code>capacity_available&lt;/code> trends downward hour after hour, but live data size has not changed. No bulk imports, no schema changes, no write spike. The SQL layer looks healthy: latency is fine, throughput is normal. But the disk is filling.&lt;/p>
&lt;p>A CDC changefeed, a backup job, or another internal operation has created a protected timestamp (PTS) record that prevents MVCC garbage collection from reclaiming old data versions. The job has stalled, paused, or entered a retry loop, but the PTS record persists. Dead MVCC data accumulates underneath it. Disk usage grows linearly until free space drops below what compaction needs, at which point L0 sublevels spike, write stalls begin, and nodes lose liveness.&lt;/p></description></item><item><title>CockroachDB Raft liveness failure cascade: slow node, lost leases, rolling unavailability</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-raft-liveness-failure-cascade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-raft-liveness-failure-cascade/</guid><description>&lt;h1 id="cockroachdb-raft-liveness-failure-cascade-slow-node-lost-leases-rolling-unavailability">CockroachDB Raft liveness failure cascade: slow node, lost leases, rolling unavailability&lt;/h1>
&lt;p>You notice brief, repeating SQL timeouts or ambiguous result errors across your application. In the CockroachDB DB Console, one node is still marked as running, yet its range lease count is oscillating and lease transfers are spiking. This is not a clean node crash. It is a Raft liveness failure cascade: a node has become slow enough to miss Raft heartbeats, but not dead enough to fail permanently. The cluster keeps trying to move leases away and back, creating rolling windows of unavailability.&lt;/p></description></item><item><title>CockroachDB Raft snapshot storm: when followers fall too far behind</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-raft-snapshot-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-raft-snapshot-storm/</guid><description>&lt;h1 id="cockroachdb-raft-snapshot-storm-when-followers-fall-too-far-behind">CockroachDB Raft snapshot storm: when followers fall too far behind&lt;/h1>
&lt;p>Raft snapshots are CockroachDB&amp;rsquo;s fallback when incremental log replication is no longer possible. A leader sends a full copy of a range (up to 512 MiB by default) to a follower that has fallen so far behind that the log entries it needs have already been truncated. In steady state, this almost never happens. When it starts happening at scale, it creates a resource-draining cycle that can degrade an entire cluster.&lt;/p></description></item><item><title>CockroachDB range count per node too high: Raft ticking as a scaling dimension</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-range-count-too-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-range-count-too-high/</guid><description>&lt;h1 id="cockroachdb-range-count-per-node-too-high-raft-ticking-as-a-scaling-dimension">CockroachDB range count per node too high: Raft ticking as a scaling dimension&lt;/h1>
&lt;p>CPU utilization is climbing across one or more CockroachDB nodes, and the usual explanations do not fit. Query throughput is flat. Disk I/O looks healthy. Admission control is not queuing. L0 sublevels are in single digits. CPU keeps trending upward, and the only change is that the database holds more data.&lt;/p>
&lt;p>The likely cause is the scaling dimension most teams never instrument: range count per node. Every range in CockroachDB is an independent Raft consensus group. Even idle, each range&amp;rsquo;s Raft state machine ticks at a fixed interval, consuming CPU separate from query execution, compaction, or any workload-driven process. This baseline overhead grows linearly with range count per node.&lt;/p></description></item><item><title>CockroachDB range unavailable: diagnosing ranges_unavailable and recovering quorum</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-range-unavailable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-range-unavailable/</guid><description>&lt;h1 id="cockroachdb-range-unavailable-diagnosing-ranges_unavailable-and-recovering-quorum">CockroachDB range unavailable: diagnosing ranges_unavailable and recovering quorum&lt;/h1>
&lt;p>The Prometheus gauge &lt;code>ranges_unavailable&lt;/code> is the hardest of hard signals in CockroachDB. When it rises above zero and stays there, some slice of your keyspace has no leaseholder or has lost Raft quorum. Reads and writes to those ranges block or fail, and applications see errors, retries, or timeouts. If the unavailable ranges include system keyspaces, the impact is not limited to user tables. The cluster may lose the ability to heartbeat node liveness, execute schema changes, or route requests.&lt;/p></description></item><item><title>CockroachDB ReadWithinUncertaintyInterval restarts: the near-diagnostic signal of clock skew</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-readwithinuncertainty-restarts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-readwithinuncertainty-restarts/</guid><description>&lt;h1 id="cockroachdb-readwithinuncertaintyinterval-restarts-the-near-diagnostic-signal-of-clock-skew">CockroachDB ReadWithinUncertaintyInterval restarts: the near-diagnostic signal of clock skew&lt;/h1>
&lt;p>When CockroachDB reports &lt;code>readwithinuncertainty&lt;/code> as a transaction restart cause, you have a clock synchronization problem. This restart cause does not appear in meaningful quantities for any other reason. Any sustained nonzero rate, even well below the self-termination threshold, indicates that NTP or the underlying clock source is not keeping node clocks aligned.&lt;/p>
&lt;p>The error stems from CockroachDB&amp;rsquo;s Hybrid Logical Clock (HLC) design. Each transaction receives a timestamp from its gateway node&amp;rsquo;s HLC, which combines physical wall-clock time with a logical counter. When a read on one node encounters a write from a transaction that started on a different node, and the two nodes&amp;rsquo; clocks are not aligned, the database cannot determine which transaction began first. CockroachDB conservatively restarts the reading transaction at a higher timestamp. Under SERIALIZABLE isolation, this restart requires client-side retry logic and adds directly to tail latency.&lt;/p></description></item><item><title>CockroachDB replica unavailable: lost quorum and stuck Raft groups</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-replica-unavailable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-replica-unavailable/</guid><description>&lt;h1 id="cockroachdb-replica-unavailable-lost-quorum-and-stuck-raft-groups">CockroachDB replica unavailable: lost quorum and stuck Raft groups&lt;/h1>
&lt;p>&lt;code>ranges_unavailable&lt;/code> has gone nonzero. Clients are seeing &amp;ldquo;replica unavailable&amp;rdquo; errors. Some portion of your keyspace cannot be read or written. This is an active availability incident.&lt;/p>
&lt;p>In CockroachDB, every range (a ~512 MiB slice of the keyspace) is replicated across multiple nodes. A write requires quorum acknowledgment from a majority of replicas before it commits. When too few replicas are reachable, the range loses quorum and cannot serve reads or writes. The &lt;code>ranges_unavailable&lt;/code> metric tracks exactly this condition: ranges with no leaseholder or with lost Raft quorum.&lt;/p></description></item><item><title>CockroachDB result is ambiguous: ambiguous commit errors and how to handle them</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-result-is-ambiguous/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-result-is-ambiguous/</guid><description>&lt;h1 id="cockroachdb-result-is-ambiguous-ambiguous-commit-errors-and-how-to-handle-them">CockroachDB result is ambiguous: ambiguous commit errors and how to handle them&lt;/h1>
&lt;p>Your application received &lt;code>result is ambiguous&lt;/code> (PostgreSQL error code 40003, &lt;code>statement_completion_unknown&lt;/code>) from CockroachDB. The transaction may have committed. It may have been aborted. The database does not know, and neither do you.&lt;/p>
&lt;p>This is not a bug. It is a correctness property of CockroachDB&amp;rsquo;s distributed commit protocol. When the transaction coordinator loses contact with the leaseholder during the final commit step, or during the last statement of an implicit transaction, it cannot determine whether the commit succeeded. Rather than guess and risk a silent double-apply, CockroachDB surfaces the ambiguity.&lt;/p></description></item><item><title>CockroachDB RETRY_WRITE_TOO_OLD: the most common contention restart and how to kill it</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-write-too-old/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-write-too-old/</guid><description>&lt;h1 id="cockroachdb-retry_write_too_old-the-most-common-contention-restart-and-how-to-kill-it">CockroachDB RETRY_WRITE_TOO_OLD: the most common contention restart and how to kill it&lt;/h1>
&lt;p>Your cluster is healthy: nodes are live, ranges are available, disk space is fine, L0 sublevels are low. But transaction commit latency is climbing, P99 is widening, and the &lt;code>txn_restarts&lt;/code> metric shows a rising rate tagged &lt;code>writetooold&lt;/code>. Whether applications surface errors to users depends on whether their retry logic works.&lt;/p>
&lt;p>RETRY_WRITE_TOO_OLD is the most common transaction restart cause under CockroachDB&amp;rsquo;s default SERIALIZABLE isolation. It is not an infrastructure problem. It is a contention problem rooted in schema design, key patterns, and transaction scope. Adding nodes does not help because the bottleneck is logical serialization, not physical capacity. Once you identify the conflicting keys and the transaction patterns driving them, writetooold restarts are fixable.&lt;/p></description></item><item><title>CockroachDB sequential primary key hotspot: SERIAL, timestamps, and write skew</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sequential-key-hotspot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sequential-key-hotspot/</guid><description>&lt;h1 id="cockroachdb-sequential-primary-key-hotspot-serial-timestamps-and-write-skew">CockroachDB sequential primary key hotspot: SERIAL, timestamps, and write skew&lt;/h1>
&lt;p>One node in your CockroachDB cluster runs hot while the others sit near idle. Write latency for specific tables climbs into hundreds of milliseconds. Transaction restarts tagged &lt;code>writetooold&lt;/code> increase steadily alongside the insert rate. The cluster has plenty of aggregate CPU, memory, and disk headroom, but the workload cannot use it.&lt;/p>
&lt;p>CockroachDB stores data in an ordered keyspace divided into ranges of approximately 512 MiB. Each range has a single leaseholder that serves all reads and coordinates all writes for keys in that range. When primary keys are sequential (SERIAL, auto-incrementing integers, timestamps), every new insert lands near the end of the keyspace, concentrated in the same range. That range&amp;rsquo;s leaseholder becomes a single-node bottleneck.&lt;/p></description></item><item><title>CockroachDB SQL error rate: XX000 internal errors and error-code triage</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-error-rate-xx000/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-error-rate-xx000/</guid><description>&lt;h1 id="cockroachdb-sql-error-rate-xx000-internal-errors-and-error-code-triage">CockroachDB SQL error rate: XX000 internal errors and error-code triage&lt;/h1>
&lt;p>&lt;code>sql_failure_count&lt;/code> is a single Prometheus counter with no error-code labels. A serialization conflict (40001) is expected noise in a contended workload. An internal error (XX000) is a database fault that needs immediate escalation. Treating the aggregate counter as one signal guarantees the wrong response.&lt;/p>
&lt;p>This article covers how to break that aggregate apart by error code, when XX000 internal errors warrant paging, and how to triage the other common error classes.&lt;/p></description></item><item><title>CockroachDB SQL latency high: sql_service_latency, per-fingerprint diagnosis, and the layers</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-sql-latency-high/</guid><description>&lt;p>P99 &lt;code>sql_service_latency&lt;/code> is climbing. Applications are timing out or retrying. The DB Console overview chart shows the spike, but the aggregate histogram cannot tell you which query is slow or which subsystem is adding the latency.&lt;/p>
&lt;p>The most common diagnostic mistake is stopping at aggregate P99. A single slow query hiding among thousands of fast ones barely moves aggregate P99 but can take down an endpoint. A system-wide storage problem lifts all fingerprints together. Without per-fingerprint breakdown, you cannot distinguish &amp;ldquo;one query regressed&amp;rdquo; from &amp;ldquo;everything got slower.&amp;rdquo;&lt;/p></description></item><item><title>CockroachDB storage_l0_sublevels climbing: the earliest warning of write stalls</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-l0-sublevels-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-l0-sublevels-high/</guid><description>&lt;h1 id="cockroachdb-storage_l0_sublevels-climbing-the-earliest-warning-of-write-stalls">CockroachDB storage_l0_sublevels climbing: the earliest warning of write stalls&lt;/h1>
&lt;p>&lt;code>storage_l0_sublevels&lt;/code> climbing on a single store is the earliest actionable signal for CockroachDB storage distress. The cluster may still serve traffic with slightly elevated SQL latency and no active write stalls. L0 sublevels typically provide 10-30 minutes of warning before write stalls begin, but only when monitored per-store. &lt;!-- TODO: verify 10-30 minute lead time holds across hardware/configs -->&lt;/p>
&lt;p>As L0 sublevels rise, Pebble consults more SSTables per read, read amplification increases nonlinearly, and compaction falls behind. Admission control shapes regular traffic at 5 sublevels and elastic traffic at 1 sublevel. &lt;!-- TODO: verify exact admission control sublevel thresholds --> Past 20 sublevels, write stalls become imminent. Because this metric is per-store, a node with multiple stores can mask a hot disk behind healthy node-level aggregates.&lt;/p></description></item><item><title>CockroachDB store is full: emergency disk recovery and why deletes don't free space</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-store-is-full/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-store-is-full/</guid><description>&lt;h1 id="cockroachdb-store-is-full-emergency-disk-recovery-and-why-deletes-dont-free-space">CockroachDB store is full: emergency disk recovery and why deletes don&amp;rsquo;t free space&lt;/h1>
&lt;p>A CockroachDB node&amp;rsquo;s store directory is full or nearly full, and the node may have already shut itself down to protect data integrity.&lt;/p>
&lt;p>Deleting data will not help immediately. CockroachDB uses MVCC: a SQL DELETE writes tombstones at new timestamps rather than removing old data. Until those tombstones propagate through Pebble compaction, the old versions stay on disk. A large-scale delete can temporarily increase disk usage because the tombstones are written before old data is reclaimed.&lt;/p></description></item><item><title>CockroachDB too many connections: sql_conns, pooling, and goroutine pressure</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-too-many-connections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-too-many-connections/</guid><description>&lt;h1 id="cockroachdb-too-many-connections-sql_conns-pooling-and-goroutine-pressure">CockroachDB too many connections: sql_conns, pooling, and goroutine pressure&lt;/h1>
&lt;p>CockroachDB has no hard built-in connection limit comparable to PostgreSQL&amp;rsquo;s &lt;code>max_connections&lt;/code>. &lt;!-- TODO: verify whether the cluster setting sql.max_connections (or server.max_connections_per_gateway) provides an effective cap in recent versions. --> Connections accumulate until something else breaks: goroutine pressure, memory exhaustion, or file descriptor limits.&lt;/p>
&lt;p>The &lt;code>sql_conns&lt;/code> gauge tracks active pgwire (SQL) connections per node. With properly configured client-side pooling, this number stays modest. When it climbs past 1000-2000 per node, you almost certainly have a pooling problem upstream.&lt;/p></description></item><item><title>CockroachDB transaction contention storm: retries, intents, and tail latency</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-contention-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-contention-storm/</guid><description>&lt;h1 id="cockroachdb-transaction-contention-storm-retries-intents-and-tail-latency">CockroachDB transaction contention storm: retries, intents, and tail latency&lt;/h1>
&lt;p>The cluster looks healthy. Node liveness is stable, &lt;code>ranges_unavailable&lt;/code> is zero, disk I/O is within bounds, CPU is moderate across all nodes. But P99 SQL latency is climbing, the transaction abort rate is up, and applications are reporting timeout errors. The database is spending most of its energy waiting, retrying, and resolving conflicts rather than doing useful work.&lt;/p>
&lt;p>This is a transaction contention storm. The infrastructure is fine; the workload is the problem. Multiple transactions are contending for the same keys, creating serialized hot paths. Each conflict generates retries under CockroachDB&amp;rsquo;s default SERIALIZABLE isolation, which in turn leaves write intents that block subsequent transactions. Under sustained load, the retry-intent-latency cycle becomes a positive feedback loop.&lt;/p></description></item><item><title>CockroachDB transaction retry rate high: breaking down txn_restarts by cause</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-retry-rate-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-retry-rate-high/</guid><description>&lt;h1 id="cockroachdb-transaction-retry-rate-high-breaking-down-txn_restarts-by-cause">CockroachDB transaction retry rate high: breaking down txn_restarts by cause&lt;/h1>
&lt;p>When application latency creeps upward without an obvious cause, or you start seeing PostgreSQL error code 40001 (serialization failure) in application logs, the transaction retry rate is likely climbing. CockroachDB exposes &lt;code>txn_restarts&lt;/code> as a set of counters, each tagged by cause. The aggregate number tells you retries are happening. It does not tell you why.&lt;/p>
&lt;p>The five dominant causes are &lt;code>writetooold&lt;/code>, &lt;code>serializable&lt;/code>, &lt;code>readwithinuncertainty&lt;/code>, &lt;code>txnaborted&lt;/code>, and &lt;code>txnpush&lt;/code>. Three additional sub-metrics (&lt;code>asyncwritefailure&lt;/code>, &lt;code>commitdeadlineexceeded&lt;/code>, &lt;code>unknown&lt;/code>) cover edge cases. A spike dominated by &lt;code>readwithinuncertainty&lt;/code> is a clock infrastructure problem. A spike dominated by &lt;code>writetooold&lt;/code> is a schema or application contention problem. The fix for one does nothing for the other.&lt;/p></description></item><item><title>CockroachDB TransactionRetryWithProtoRefreshError: RETRY_SERIALIZABLE causes and fixes</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-retry-serializable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-transaction-retry-serializable/</guid><description>&lt;h1 id="cockroachdb-transactionretrywithprotorefresherror-retry_serializable-causes-and-fixes">CockroachDB TransactionRetryWithProtoRefreshError: RETRY_SERIALIZABLE causes and fixes&lt;/h1>
&lt;p>The application logs show &lt;code>TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh due to a conflict: committed value on key /Table/.../0)&lt;/code>. SQLSTATE is 40001. Clients are timing out or failing outright. The cluster looks healthy: nodes are live, ranges are available, disk space is fine. The problem is in the transaction layer.&lt;/p>
&lt;p>Under SERIALIZABLE isolation (CockroachDB&amp;rsquo;s default), the database uses optimistic concurrency. It proceeds as if no conflict exists, then detects conflicts at commit or statement boundary. When a transaction&amp;rsquo;s preemptive refresh fails because another transaction already committed a write to a key the first transaction read, CockroachDB emits RETRY_SERIALIZABLE. This is expected behavior, not a bug.&lt;/p></description></item><item><title>CockroachDB under-replicated ranges: ranges_underreplicated and the healing margin</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-under-replicated-ranges/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-under-replicated-ranges/</guid><description>&lt;h1 id="cockroachdb-under-replicated-ranges-ranges_underreplicated-and-the-healing-margin">CockroachDB under-replicated ranges: ranges_underreplicated and the healing margin&lt;/h1>
&lt;p>When &lt;code>ranges_underreplicated&lt;/code> rises above zero, CockroachDB has ranges with fewer live replicas than the configured replication factor. The replicate queue is already working to heal them by transferring Raft snapshots to new target nodes, but until healing completes, those ranges have reduced or zero fault tolerance margin.&lt;/p>
&lt;p>The key operational question is not whether under-replicated ranges exist (they will, transiently, after almost any node event), but whether the cluster is healing fast enough to stay ahead of the next failure. This is the healing margin: the buffer between the current replication state and the point where a range loses quorum and becomes unavailable.&lt;/p></description></item><item><title>CockroachDB WAL fsync latency high: the most direct write-path health signal</title><link>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-wal-fsync-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/cockroachdb-wal-fsync-latency-high/</guid><description>&lt;h1 id="cockroachdb-wal-fsync-latency-high-the-most-direct-write-path-health-signal">CockroachDB WAL fsync latency high: the most direct write-path health signal&lt;/h1>
&lt;p>Elevated &lt;code>storage_wal_fsync_latency&lt;/code> means the storage device is taking too long to durably persist write-ahead log entries. Every write in CockroachDB must complete a WAL fsync before Raft can acknowledge it. Fsync latency is the gating signal for the entire write path.&lt;/p>
&lt;p>On healthy local SSDs, WAL fsync P99 should be under 10ms. Sustained values above 50ms mean the device is struggling. Above 200ms, the node is approaching disk stall territory, where CockroachDB&amp;rsquo;s built-in stall detection may terminate the process to prevent data inconsistency. Disk stalls cause self-termination before utilization metrics react: a volume reporting 60% utilization can stall on an individual fsync for seconds if the underlying hardware is failing, the I/O scheduler is misbehaving, or a cloud provider is throttling IOPS.&lt;/p></description></item><item><title>How CockroachDB actually works in production: a mental model for operators</title><link>https://www.netdata.cloud/guides/cockroachdb/how-cockroachdb-works-in-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/cockroachdb/how-cockroachdb-works-in-production/</guid><description>&lt;h1 id="how-cockroachdb-actually-works-in-production-a-mental-model-for-operators">How CockroachDB actually works in production: a mental model for operators&lt;/h1>
&lt;p>CockroachDB is a distributed, strongly-consistent SQL database built on a replicated key-value store. It layers SQL execution on top of a transactional KV engine that uses Raft consensus for replication and MVCC for concurrency control. To reason about its failures, you must hold several interacting subsystems in your head simultaneously.&lt;/p>
&lt;p>This is not a tutorial. It is the mental model that experienced operators use when diagnosing slow queries, unavailable ranges, clock skew, and compaction death spirals. Each subsystem has its own failure modes, but the most damaging incidents happen when failures cascade across layers.&lt;/p></description></item></channel></rss>