{"record":{"id":"76ed7ce8504e59e4","repo":"aeron-io/aeron","slug":"timeout-awaiting-commit-position","errorCode":null,"errorMessage":"timeout awaiting commit position","messagePattern":"timeout awaiting commit position","errorType":"exception","errorClass":"TimeoutException","httpStatus":null,"severity":"warning","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/Election.java","lineNumber":952,"sourceCode":"                    ConsensusModuleAgent.logReplicationEnded(\n                        thisMember.id(),\n                        \"ELECTION\",\n                        logReplication.srcArchiveChannel(),\n                        logReplication.recordingId(),\n                        leaderRecordingId,\n                        logReplication.position(),\n                        logReplication.hasSynced());\n\n                    appendPosition = logReplication.position();\n                    stopLogReplication();\n                    updateRecordingLogForReplication(\n                        replicationLeadershipTermId, replicationTermBaseLogPosition, replicationStopPosition, nowNs);\n                    state(CANVASS, nowNs, \"\");\n                    workCount++;\n                }\n                else if (nowNs >= replicationDeadlineNs)\n                {\n                    throw new TimeoutException(\"timeout awaiting commit position\", AeronException.Category.WARN);\n                }\n            }\n        }\n\n        return workCount;\n    }\n\n    private int followerReplay(final long nowNs)\n    {\n        int workCount = 0;\n\n        if (null == logReplay)\n        {\n            if (logPosition < appendPosition)\n            {\n                if (0 == notifiedCommitPosition)\n                {\n                    return publishFollowerAppendPosition(nowNs);","sourceCodeStart":934,"sourceCodeEnd":970,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/Election.java#L934-L970","documentation":"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).","triggerScenarios":"Follower enters LOG_REPLICATION, but nowNs >= replicationDeadlineNs elapses without the leader's commit position advancing past replicationStopPosition.","commonSituations":"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.","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"],"exampleFix":"// before\nctx.electionTimeoutNs(TimeUnit.SECONDS.toNanos(1));\n// after\nctx.electionTimeoutNs(TimeUnit.SECONDS.toNanos(10));","handlingStrategy":"retry","validationCode":"// before starting the cluster, sanity-check election timeout config\nif (ctx.electionTimeoutNs() < TimeUnit.SECONDS.toNanos(5)) {\n    throw new IllegalArgumentException(\"electionTimeoutNs too small for LOG_REPLICATION\");\n}","typeGuard":null,"tryCatchPattern":"catch (TimeoutException e) {\n    if (AeronException.Category.WARN == e.category()) {\n        // election will re-canvas automatically; alert on repetition only\n    }\n}","preventionTips":["Size electionTimeoutNs generously vs. log sizes and disk throughput","Monitor leader CPU/disk latency","Alert on repeated election failures on the same member"],"tags":["timeout","consensus","election"],"backgroundTag":"request-timeout","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}