{"record":{"id":"1bb5210c3655e967","repo":"nats-io/nats-server","slug":"canceling-catchup-for-q-could-not-subscribe-to-p","errorCode":null,"errorMessage":"Canceling catchup for %q, could not subscribe to progress inbox: %v","messagePattern":"Canceling catchup for %q, could not subscribe to progress inbox: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":3645,"sourceCode":"\t\tif q, ok := n.progress[peer]; ok && q == indexUpdatesQ {\n\t\t\tdelete(n.progress, peer)\n\t\t\tif len(n.progress) == 0 {\n\t\t\t\tn.progress = nil\n\t\t\t}\n\t\t}\n\t\t// Check if this is a new peer and if so go ahead and propose adding them.\n\t\t_, exists := n.peers[peer]\n\t\tn.Unlock()\n\t\tif !exists {\n\t\t\tn.debug(\"Catchup done for %q, will add into peers\", peer)\n\t\t\tn.ProposeAddPeer(peer)\n\t\t}\n\t\tindexUpdatesQ.unregister()\n\t}()\n\n\tif err != nil {\n\t\t// Without the progress subscription, there's no flow control, so catchup would stall.\n\t\tn.warn(\"Canceling catchup for %q, could not subscribe to progress inbox: %v\", peer, err)\n\t\treturn\n\t}\n\tif !leader {\n\t\tn.debug(\"Canceling catchup for %q, not leader anymore\", peer)\n\t\treturn\n\t}\n\tn.debug(\"Running catchup for %q [%d:%d] to [%d:%d]\", peer, ar.term, ar.index, pterm, last)\n\n\tconst maxOutstanding = 2 * 1024 * 1024 // 2MB for now.\n\tnext, total, om := uint64(0), 0, make(map[uint64]int)\n\n\tsendNext := func() bool {\n\t\tfor total <= maxOutstanding {\n\t\t\tnext++\n\t\t\tif next > last {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tae, err := n.loadEntry(next)","sourceCodeStart":3627,"sourceCodeEnd":3663,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L3627-L3663","documentation":"While setting up catchup for a follower, the leader could not subscribe to the per-peer progress inbox used for flow control. Without that feedback channel, catchup would stall, so the catchup is aborted and any queued state is unwound.","triggerScenarios":"Thrown at server/raft.go:3645 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the subscribe error for resource exhaustion (subs limit, memory)","Let the follower re-request catchup; a new attempt will retry the subscription","Scale down subscription pressure on the internal transport if this recurs"],"exampleFix":null,"handlingStrategy":"retry","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"}