{"record":{"id":"d07c523d68b915f7","repo":"aeron-io/aeron","slug":"mtulength-mtulength-initialwindowlength-initialwindowlength","errorCode":null,"errorMessage":"mtuLength=${mtuLength} > initialWindowLength=${initialWindowLength}","messagePattern":"mtuLength=(.+?) > initialWindowLength=(.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/Configuration.java","lineNumber":2435,"sourceCode":"        }\n        catch (final NumberFormatException ex)\n        {\n            throw new AsciiNumberFormatException(\n                \"Property \" + STREAM_SESSION_LIMIT_PROP_NAME + \"=\" + streamSessionLimitString + \" is not a number\");\n        }\n    }\n\n    /**\n     * Validate that the initial window length is greater than MTU.\n     *\n     * @param initialWindowLength to be validated.\n     * @param mtuLength           against which to validate.\n     */\n    public static void validateInitialWindowLength(final int initialWindowLength, final int mtuLength)\n    {\n        if (mtuLength > initialWindowLength)\n        {\n            throw new ConfigurationException(\n                \"mtuLength=\" + mtuLength + \" > initialWindowLength=\" + initialWindowLength);\n        }\n    }\n\n    /**\n     * Validate that the MTU is an appropriate length. MTU lengths must be a multiple of\n     * {@link FrameDescriptor#FRAME_ALIGNMENT}.\n     *\n     * @param mtuLength to be validated.\n     * @throws ConfigurationException if the MTU length is not valid.\n     */\n    public static void validateMtuLength(final int mtuLength)\n    {\n        if (mtuLength <= DataHeaderFlyweight.HEADER_LENGTH)\n        {\n            throw new ConfigurationException(\n                \"mtuLength=\" + mtuLength + \" <= HEADER_LENGTH=\" + DataHeaderFlyweight.HEADER_LENGTH);\n        }","sourceCodeStart":2417,"sourceCodeEnd":2453,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/Configuration.java#L2417-L2453","documentation":"Configuration.validateInitialWindowLength enforces that a flow-control initial window is at least as large as the MTU, since the receiver window must be able to hold at least one maximum-sized packet. If mtuLength exceeds initialWindowLength the configuration is contradictory and the driver throws ConfigurationException.","triggerScenarios":"Calling validateInitialWindowLength(initialWindowLength, mtuLength) (directly or via driver/channel setup) with an aeron.mtu.length larger than aeron.socket.initial.window.length, e.g. mtuLength=16384 with initialWindowLength=8192.","commonSituations":"Raising MTU for jumbo frames without raising the initial window, copy-pasting one value from a sample and forgetting the other, or per-channel URIs overriding MTU above the globally configured window.","solutions":["Increase the initial window length to be >= the MTU length","Lower the MTU length to be <= the initial window length","Check both aeron.mtu.length and aeron.socket.initial.window.length (and channel URI mtu= overrides) so they are consistent"],"exampleFix":"// before\nctx.mtuLength(16384).initialWindowLength(8192);\n// after\nctx.mtuLength(16384).initialWindowLength(16384);","handlingStrategy":"validation","validationCode":"if (ctx.mtuLength() > ctx.initialWindowLength()) {\n    ctx.initialWindowLength(ctx.mtuLength());\n}","typeGuard":null,"tryCatchPattern":"try { mediaDriver.launch(ctx); } catch (ConfigurationException e) { fixWindowMtuConfig(e); }","preventionTips":["Keep initialWindowLength >= mtuLength whenever changing MTU","Check channel URI mtu= overrides against the global window setting","Run a config validation step in deployment scripts"],"tags":["aeron-driver","configuration","mtu","validation"],"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"}