aeron-io/aeron · warning · TimeoutException
timeout awaiting commit position
Error message
timeout awaiting commit position
What it means
TimeoutException (WARN) thrown in Election.followerLogReplication when a follower in the LOG_REPLICATION state fails to observe progress on the commit position within the configured election timeout (replicationDeadlineNs). The follower expected the leader to keep streaming log replication / commit-position updates but none arrived in time, so the election aborts and is retried (often via CANVASS).
Solutions
- Verify the leader is alive and reachable; check for network partitions or firewall drops between cluster members
- Increase ctx.electionTimeoutNs() / leaderHeartbeatTimeoutNs in the cluster config to tolerate slow replication
- Check leader CPU/disk load; log replay and recording can starve the consensus agent thread
- Ensure clock and scheduling: run agents on dedicated threads; check for GC pauses on the leader
Example fix
// before ctx.electionTimeoutNs(TimeUnit.SECONDS.toNanos(1)); // after ctx.electionTimeoutNs(TimeUnit.SECONDS.toNanos(10));
Defensive patterns
Strategy: retry
Validate before calling
// before starting the cluster, sanity-check election timeout config
if (ctx.electionTimeoutNs() < TimeUnit.SECONDS.toNanos(5)) {
throw new IllegalArgumentException("electionTimeoutNs too small for LOG_REPLICATION");
} Try / catch
catch (TimeoutException e) {
if (AeronException.Category.WARN == e.category()) {
// election will re-canvas automatically; alert on repetition only
}
} Prevention
- Size electionTimeoutNs generously vs. log sizes and disk throughput
- Monitor leader CPU/disk latency
- Alert on repeated election failures on the same member
When it happens
Trigger: Follower enters LOG_REPLICATION, but nowNs >= replicationDeadlineNs elapses without the leader's commit position advancing past replicationStopPosition.
Common situations: Leader crashed or network partition during election; slow disk/CPU on the leader delaying replication; leaderHeartbeatTimeoutNs/electionTimeoutNs set too low for large catchup volumes; leader busy recording replay.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- startupCanvassTimeoutNs=
- logSessionId was null, should always have a value
- failed to send catchup position
- failed to join catchup log as follower
- failed to join catchup log
AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12).
Data as JSON: /api/errors/76ed7ce8504e59e4.
Report an issue: GitHub.
Appendix: source
Thrown at aeron-cluster/src/main/java/io/aeron/cluster/Election.java:952
ConsensusModuleAgent.logReplicationEnded(
thisMember.id(),
"ELECTION",
logReplication.srcArchiveChannel(),
logReplication.recordingId(),
leaderRecordingId,
logReplication.position(),
logReplication.hasSynced());
appendPosition = logReplication.position();
stopLogReplication();
updateRecordingLogForReplication(
replicationLeadershipTermId, replicationTermBaseLogPosition, replicationStopPosition, nowNs);
state(CANVASS, nowNs, "");
workCount++;
}
else if (nowNs >= replicationDeadlineNs)
{
throw new TimeoutException("timeout awaiting commit position", AeronException.Category.WARN);
}
}
}
return workCount;
}
private int followerReplay(final long nowNs)
{
int workCount = 0;
if (null == logReplay)
{
if (logPosition < appendPosition)
{
if (0 == notifiedCommitPosition)
{
return publishFollowerAppendPosition(nowNs);View on GitHub (pinned to 6d60124e15)