{"record":{"id":"8685e98c2680f433","repo":"nats-io/nats-server","slug":"health-check-ok-no-longer-falling-behind","errorCode":null,"errorMessage":"Health check OK, no longer falling behind","messagePattern":"Health check OK, no longer falling behind","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":2134,"sourceCode":"// Lock should be held.\nfunc (n *raft) isCurrent(includeForwardProgress bool) bool {\n\t// Check if we are closed.\n\tif n.State() == Closed {\n\t\tn.debug(\"Not current, node is closed\")\n\t\treturn false\n\t}\n\n\t// Check whether we've made progress on any state, 0 is invalid so not healthy.\n\tif n.commit == 0 {\n\t\tn.debug(\"Not current, no commits\")\n\t\treturn false\n\t}\n\n\t// If we were previously logging about falling behind, also log when the problem\n\t// was cleared.\n\tclearBehindState := func() {\n\t\tif n.hcbehind {\n\t\t\tn.warn(\"Health check OK, no longer falling behind\")\n\t\t\tn.hcbehind = false\n\t\t}\n\t}\n\n\t// Make sure we are the leader or we know we have heard from the leader recently.\n\tif n.State() == Leader {\n\t\tclearBehindState()\n\t\treturn true\n\t}\n\n\t// Check to see that we have heard from the current leader lately.\n\tif n.leader != noLeader && n.leader != n.id && n.catchup == nil {\n\t\tokInterval := hbInterval * 2\n\t\tif ps := n.peers[n.leader]; ps == nil || time.Since(ps.ts) > okInterval {\n\t\t\tn.debug(\"Not current, no recent leader contact\")\n\t\t\treturn false\n\t\t}\n\t}","sourceCodeStart":2116,"sourceCodeEnd":2152,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L2116-L2152","documentation":"Informational: the node was previously logging 'Falling behind in health check' (hcbehind set) but commit progress has now caught up with applied, clearing the degraded flag. Logged once on the transition back to healthy.","triggerScenarios":"Thrown at server/raft.go:2134 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No action needed; health recovered","If falling-behind recurs, profile slow apply consumers or downstream systems","Check for periodic apply starvation (large batches, slow consumers)"],"exampleFix":null,"handlingStrategy":"validation","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"}