{"record":{"id":"1f9acadcf63113ae","repo":"nats-io/nats-server","slug":"quorum-paused-falling-behind-commit-d-applie","errorCode":null,"errorMessage":"Quorum paused, falling behind: commit %d != applied %d, WAL size %s","messagePattern":"Quorum paused, falling behind: commit (.+?) != applied (.+?), WAL size (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":4654,"sourceCode":"\t\t\t\tif catchingUp {\n\t\t\t\t\tn.cancelCatchup()\n\t\t\t\t}\n\t\t\t\tn.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Once we're sufficiently below the threshold, we continue again. We'll likely receive a snapshot\n\t\t\t// from the leader.\n\t\t\tn.quorumPaused = false\n\t\t\tvar state StreamState\n\t\t\tn.wal.FastState(&state)\n\t\t\tn.warn(\"Quorum resumed: commit %d, applied %d, WAL size %s\", commit, applied, friendlyBytes(state.Bytes))\n\t\t} else if n.overrun(diff, pauseQuorumThreshold, pauseQuorumBytes) {\n\t\t\t// It takes a while until we reach the pause threshold, but once we do we enter a \"cooldown period\".\n\t\t\tn.quorumPaused = true\n\t\t\tn.overrunCount++\n\t\t\tvar state StreamState\n\t\t\tn.wal.FastState(&state)\n\t\t\tn.warn(\"Quorum paused, falling behind: commit %d != applied %d, WAL size %s\", commit, applied, friendlyBytes(state.Bytes))\n\t\t\tif catchingUp {\n\t\t\t\tn.cancelCatchup()\n\t\t\t}\n\t\t\tn.Unlock()\n\t\t\treturn\n\t\t}\n\t}\n\n\tif ae.pterm != n.pterm || ae.pindex != n.pindex {\n\t\t// Check if this is a lower or equal index than what we were expecting.\n\t\tif ae.pindex <= n.pindex {\n\t\t\tn.debug(\"AppendEntry detected pindex less than/equal to ours: [%d:%d] vs [%d:%d]\", ae.pterm, ae.pindex, n.pterm, n.pindex)\n\t\t\tvar success bool\n\n\t\t\tif ae.pindex < n.commit {\n\t\t\t\t// If we have already committed this entry, just mark success.\n\t\t\t\tsuccess = true\n\t\t\t\tn.debug(\"AppendEntry pindex %d below commit %d, marking success\", ae.pindex, n.commit)","sourceCodeStart":4636,"sourceCodeEnd":4672,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L4636-L4672","documentation":"Backpressure event: the commit-applied gap exceeded the pause threshold (count or bytes), so the node pauses the apply/quorum path to avoid unbounded WAL growth while the upper layer catches up. While paused, the node expects to converge, likely via a snapshot from the leader; catchup may be cancelled.","triggerScenarios":"Thrown at server/raft.go:4654 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Speed up the apply path (scale consumers, fix slow downstream sinks)","Let the pause/resume cycle or incoming snapshot resolve the gap","Tune stream limits if pauses recur under normal load"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}