nats-io/nats-server · error

Health check OK, no longer falling behind

Error message

Health check OK, no longer falling behind

What it means

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.

Source

Thrown at server/raft.go:2134

// Lock should be held.
func (n *raft) isCurrent(includeForwardProgress bool) bool {
	// Check if we are closed.
	if n.State() == Closed {
		n.debug("Not current, node is closed")
		return false
	}

	// Check whether we've made progress on any state, 0 is invalid so not healthy.
	if n.commit == 0 {
		n.debug("Not current, no commits")
		return false
	}

	// If we were previously logging about falling behind, also log when the problem
	// was cleared.
	clearBehindState := func() {
		if n.hcbehind {
			n.warn("Health check OK, no longer falling behind")
			n.hcbehind = false
		}
	}

	// Make sure we are the leader or we know we have heard from the leader recently.
	if n.State() == Leader {
		clearBehindState()
		return true
	}

	// Check to see that we have heard from the current leader lately.
	if n.leader != noLeader && n.leader != n.id && n.catchup == nil {
		okInterval := hbInterval * 2
		if ps := n.peers[n.leader]; ps == nil || time.Since(ps.ts) > okInterval {
			n.debug("Not current, no recent leader contact")
			return false
		}
	}

View on GitHub (pinned to 3a66a489d2)

Solutions

  1. No action needed; health recovered
  2. If falling-behind recurs, profile slow apply consumers or downstream systems
  3. Check for periodic apply starvation (large batches, slow consumers)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/raft.go:2134 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02). Data as JSON: /api/errors/8685e98c2680f433. Report an issue: GitHub.