{"record":{"id":"ddd4bb23d86b9ae5","repo":"aeron-io/aeron","slug":"property-stream-session-limit-prop-name","errorCode":null,"errorMessage":"Property ${STREAM_SESSION_LIMIT_PROP_NAME}=${streamSessionLimitString} is not a number","messagePattern":"Property (.+?)=(.+?) is not a number","errorType":"validation","errorClass":"AsciiNumberFormatException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/Configuration.java","lineNumber":2420,"sourceCode":"\n    /**\n     * Get the configured limit for the number of streams per session.\n     *\n     * @return configured session limit\n     * @throws AsciiNumberFormatException if the property referenced by {@link #STREAM_SESSION_LIMIT_PROP_NAME} is not\n     *                                    a valid number\n     */\n    public static int streamSessionLimit()\n    {\n        final String streamSessionLimitString = getProperty(STREAM_SESSION_LIMIT_PROP_NAME);\n        try\n        {\n            return Strings.isEmpty(streamSessionLimitString) ?\n                STREAM_SESSION_LIMIT_DEFAULT : Integer.parseInt(streamSessionLimitString);\n        }\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    }","sourceCodeStart":2402,"sourceCodeEnd":2438,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/Configuration.java#L2402-L2438","documentation":"The driver configuration reads the stream session limit property (aeron.driver.stream.session.limit) and parses it as an int. If the property string is non-empty but not a valid integer, Integer.parseInt throws NumberFormatException, which is rethrown as AsciiNumberFormatException naming the property and its offending value so the driver fails fast at startup rather than using a garbage value.","triggerScenarios":"Setting the system property aeron.driver.stream.session.limit (or the corresponding context value) to a non-numeric string like \"ten\", \"10x\", or \"\" with surrounding junk characters when Configuration.streamSessionLimit() is invoked.","commonSituations":"Typo in a driver properties file, quoting mistakes in JVM -D flags, or environment-derived values interpolated as strings into numeric config.","solutions":["Set the property to a plain integer, e.g. -Daeron.driver.stream.session.limit=100","Remove the property entirely to use STREAM_SESSION_LIMIT_DEFAULT","Check the driver properties file (aeron.driver.properties) for typos, whitespace, or quotes in the value"],"exampleFix":"// before\n-Daeron.driver.stream.session.limit=\"100\"\n// after\n-Daeron.driver.stream.session.limit=100","handlingStrategy":"validation","validationCode":"String v = System.getProperty(\"aeron.driver.stream.session.limit\");\nif (v != null && !v.isBlank()) { Integer.parseInt(v.trim()); } // throws early with your own message","typeGuard":"boolean isValidIntConfig(String s) { if (s == null || s.isBlank()) return true; try { Integer.parseInt(s.trim()); return true; } catch (NumberFormatException e) { return false; } }","tryCatchPattern":"try { startDriver(cfg); } catch (AsciiNumberFormatException e) { log.fatal(\"bad driver config: \" + e.getMessage()); System.exit(1); }","preventionTips":["Never quote values in -D flags or properties files","Validate driver properties before launch (CI check)","Prefer Aeron.Context setters over raw system properties where possible"],"tags":["aeron-driver","configuration","number-format","startup"],"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"}