{"record":{"id":"f8b442e3c8613357","repo":"aeron-io/aeron","slug":"interservicetimeoutns-interservicetimeoutns","errorCode":null,"errorMessage":"interServiceTimeoutNs=<interServiceTimeoutNs> <= keepAliveIntervalNs=<keepAliveIntervalNs>","messagePattern":"interServiceTimeoutNs=<interServiceTimeoutNs> <= keepAliveIntervalNs=<keepAliveIntervalNs>","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"aeron-client/src/main/java/io/aeron/Aeron.java","lineNumber":1232,"sourceCode":"            }\n\n            if (null == idleStrategy)\n            {\n                idleStrategy = new SleepingMillisIdleStrategy(TimeUnit.NANOSECONDS.toMillis(idleSleepDurationNs));\n            }\n\n            if (null == awaitingIdleStrategy)\n            {\n                awaitingIdleStrategy = new SleepingMillisIdleStrategy(Configuration.AWAITING_IDLE_SLEEP_MS);\n            }\n\n            connectToDriver();\n            filePageSize = driverFilePageSize(cncMetaDataBuffer);\n\n            interServiceTimeoutNs = CncFileDescriptor.clientLivenessTimeoutNs(cncMetaDataBuffer);\n            if (interServiceTimeoutNs <= keepAliveIntervalNs)\n            {\n                throw new ConfigurationException(\"interServiceTimeoutNs=\" + interServiceTimeoutNs +\n                    \" <= keepAliveIntervalNs=\" + keepAliveIntervalNs);\n            }\n\n            if (null == toDriverBuffer)\n            {\n                toDriverBuffer = new ManyToOneRingBuffer(\n                    CncFileDescriptor.createToDriverBuffer(cncByteBuffer, cncMetaDataBuffer));\n            }\n\n            if (null == toClientBuffer)\n            {\n                toClientBuffer = new CopyBroadcastReceiver(new BroadcastReceiver(\n                    CncFileDescriptor.createToClientsBuffer(cncByteBuffer, cncMetaDataBuffer)),\n                    new ExpandableArrayBuffer(CopyBroadcastReceiver.SCRATCH_BUFFER_LENGTH));\n            }\n\n            if (countersMetaDataBuffer() == null)\n            {","sourceCodeStart":1214,"sourceCodeEnd":1250,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-client/src/main/java/io/aeron/Aeron.java#L1214-L1250","documentation":"After connecting to the driver's C'n' file, Aeron reads the client liveness timeout from the driver and uses it as interServiceTimeoutNs. If that timeout is not strictly greater than the configured keepAliveIntervalNs, the client could be declared dead by the driver even while heartbeating, so the Context throws this ConfigurationException. It indicates an inconsistent client/keepalive configuration or a driver configured with an unusually small timeout.","triggerScenarios":"Connecting to a media driver whose C'n' file reports clientLivenessTimeoutNs <= the client's keepAliveIntervalNs, e.g. driver configured with a very small client liveness timeout while the client keeps the default keepAliveIntervalNs, or the client explicitly set a large keepAliveIntervalNs via ctx.keepAliveIntervalNs(...).","commonSituations":"Tuning a low-latency driver (short liveness timeout) without lowering the client keepalive interval; driver and client using different configuration sets; loading stale driver properties after reconfiguring the driver.","solutions":["Lower the client keepAliveIntervalNs so it is strictly less than the driver's client liveness timeout","Raise the driver's aeron.client.liveness.timeout so it exceeds the client keepalive interval (requires driver restart)","Verify the C'n' file being connected to belongs to the driver instance you configured"],"exampleFix":"// before\nctx.keepAliveIntervalNs(TimeUnit.SECONDS.toNanos(1)); // driver liveness timeout is 500ms -> throws\n// after\nctx.keepAliveIntervalNs(TimeUnit.MILLISECONDS.toNanos(100)); // must be < driver clientLivenessTimeoutNs","handlingStrategy":"validation","validationCode":"// after obtaining CncMetaDataBuffer: long liveness = CncFileDescriptor.clientLivenessTimeoutNs(meta); if (liveness <= ctx.keepAliveIntervalNs()) { ctx.keepAliveIntervalNs(liveness / 4); }","typeGuard":null,"tryCatchPattern":"try { return Aeron.connect(ctx); } catch (ConfigurationException e) { if (e.getMessage().contains(\"interServiceTimeoutNs\") && e.getMessage().contains(\"keepAliveIntervalNs\")) { ctx.keepAliveIntervalNs(TimeUnit.MILLISECONDS.toNanos(100)); return Aeron.connect(ctx); } throw e; }","preventionTips":["Keep client keepAliveIntervalNs well below the driver's client liveness timeout (e.g. 1/4)","Use consistent configuration between driver and clients","Re-check settings after driver reconfiguration or restarts"],"tags":["configuration","timeout","keepalive","driver-liveness"],"backgroundTag":"invalid-config-value","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"}