{"record":{"id":"414b3e2037723df0","repo":"aeron-io/aeron","slug":"timed-out-waiting-for-replay-connection-to-have-available","errorCode":null,"errorMessage":"timed out waiting for replay connection to have available publication limit","messagePattern":"timed out waiting for replay connection to have available publication limit","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java","lineNumber":4373,"sourceCode":"            {\n                throw new ArchiveException(\"failed to send replay request\");\n            }\n\n            pollForResponse(lastCorrelationId);\n\n            return lastCorrelationId;\n        }\n    }\n\n    private static void checkDeadline(\n        final IdleStrategy idleStrategy,\n        final NanoClock nanoClock,\n        final long deadlineNs,\n        final String msg)\n    {\n        if (deadlineNs <= nanoClock.nanoTime())\n        {\n            throw new ArchiveException(msg);\n        }\n\n        idleStrategy.idle();\n    }\n}\n","sourceCodeStart":4355,"sourceCodeEnd":4379,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java#L4355-L4379","documentation":"Generic deadline check helper: thrown when a wait deadline (deadlineNs) has passed while polling for a condition, here reported as 'replay connection to have available publication limit'. The replay publication connected but the archive never raised the publication limit (available window) before the timeout.","triggerScenarios":"startReplay response-channel flow waits for pubLmtCounterId > 0 with checkDeadline(deadlineNs, ...); the archive does not grant publication window within context.messageTimeoutNs.","commonSituations":"Archive slow or overloaded; replay subscription-side backpressure; messageTimeoutNs too small; archive failed to start the replay so the limit never advances.","solutions":["Increase messageTimeoutNs in AeronArchive.Context","Confirm the archive actually started the replay (correlation id in archive logs)","Check subscriber/consumer progress — the limit stays 0 while the replay subscription is not draining","Verify no driver errors and sufficient network capacity between archive and client"],"exampleFix":"// before\nctx.messageTimeoutNs(TimeUnit.SECONDS.toNanos(5));\n// after\nctx.messageTimeoutNs(TimeUnit.MINUTES.toNanos(1));","handlingStrategy":"retry","validationCode":"// ensure timeout is adequate\nif (ctx.messageTimeoutNs() < TimeUnit.SECONDS.toNanos(30)) { ctx.messageTimeoutNs(TimeUnit.SECONDS.toNanos(30)); }","typeGuard":null,"tryCatchPattern":"try { archive.startReplay(...); } catch (ArchiveException e) { if (e.getMessage().contains(\"timed out\")) { raiseTimeout(); retry(); } }","preventionTips":["Size messageTimeoutNs for slow archives and networks","Ensure the replay subscription is actively draining","Check archive load and publication limit progression via counters"],"tags":["aeron-archive","replay","timeout","publication-limit"],"backgroundTag":"request-timeout","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}