{"record":{"id":"6013ec45c5a65d9b","repo":"apache/cassandra","slug":"internode-max-message-size-must-no-exceed-internod-6013ec","errorCode":null,"errorMessage":"internode_max_message_size must no exceed internode_application_send_queue_reserve_endpoint_capacity","messagePattern":"internode_max_message_size must no exceed internode_application_send_queue_reserve_endpoint_capacity","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1213,"sourceCode":"            if (conf.server_encryption_options.legacy_ssl_storage_port_enabled &&\n                conf.server_encryption_options.tlsEncryptionPolicy() == EncryptionOptions.TlsEncryptionPolicy.UNENCRYPTED)\n            {\n                throw new ConfigurationException(\"legacy_ssl_storage_port_enabled is true (enabled) with internode encryption disabled (none). Enable encryption or disable the legacy ssl storage port.\");\n            }\n        }\n\n        if (conf.internode_max_message_size != null)\n        {\n            long maxMessageSize = conf.internode_max_message_size.toBytes();\n\n            if (maxMessageSize > conf.internode_application_receive_queue_reserve_endpoint_capacity.toBytes())\n                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_receive_queue_reserve_endpoint_capacity\", false);\n\n            if (maxMessageSize > conf.internode_application_receive_queue_reserve_global_capacity.toBytes())\n                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_receive_queue_reserve_global_capacity\", false);\n\n            if (maxMessageSize > conf.internode_application_send_queue_reserve_endpoint_capacity.toBytes())\n                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_send_queue_reserve_endpoint_capacity\", false);\n\n            if (maxMessageSize > conf.internode_application_send_queue_reserve_global_capacity.toBytes())\n                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_send_queue_reserve_global_capacity\", false);\n        }\n        else\n        {\n            long maxMessageSizeInBytes =\n            Math.min(conf.internode_application_receive_queue_reserve_endpoint_capacity.toBytes(),\n                     conf.internode_application_send_queue_reserve_endpoint_capacity.toBytes());\n\n            conf.internode_max_message_size = new DataStorageSpec.IntBytesBound(maxMessageSizeInBytes);\n        }\n\n        validateMaxConcurrentAutoUpgradeTasksConf(conf.max_concurrent_automatic_sstable_upgrades);\n\n        if (conf.default_keyspace_rf < conf.minimum_replication_factor_fail_threshold)\n        {\n            throw new ConfigurationException(String.format(\"default_keyspace_rf (%d) cannot be less than minimum_replication_factor_fail_threshold (%d)\",","sourceCodeStart":1195,"sourceCodeEnd":1231,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1195-L1231","documentation":"For symmetry with the receive path, internode_max_message_size cannot exceed the per-endpoint reserved capacity of the internode send queue; a max-size message must fit in the reserved send buffer. DatabaseDescriptor throws this ConfigurationException when maxMessageSize > internode_application_send_queue_reserve_endpoint_capacity.","triggerScenarios":"cassandra.yaml sets internode_max_message_size_in_bytes greater than internode_application_send_queue_reserve_endpoint_capacity_in_bytes (after both receive-queue checks pass) during applySimpleConfig.","commonSituations":"Tuning only the receive-side reserves for large messages; memory-reduction exercises that shrank send queues; version upgrades where send-queue default shrank below a previously set message size.","solutions":["Raise internode_application_send_queue_reserve_endpoint_capacity_in_bytes to at least internode_max_message_size_in_bytes","Lower internode_max_message_size_in_bytes to fit within the send-queue reserve","Remove overrides and use defaults"],"exampleFix":"# before (cassandra.yaml)\ninternode_max_message_size_in_bytes: 104857600\ninternode_application_send_queue_reserve_endpoint_capacity_in_bytes: 8388608\n# after\ninternode_max_message_size_in_bytes: 104857600\ninternode_application_send_queue_reserve_endpoint_capacity_in_bytes: 134217728","handlingStrategy":"validation","validationCode":"if (conf.internode_max_message_size != null &&\n    conf.internode_max_message_size.toBytes() > conf.internode_application_send_queue_reserve_endpoint_capacity.toBytes())\n    throw new IllegalArgumentException(\"internode_max_message_size must not exceed send-queue endpoint reserve\");","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.applyConfig(conf); } catch (ConfigurationException e) { if (e.getMessage().contains(\"send_queue_reserve_endpoint_capacity\")) { /* raise send reserve or lower message size */ } }","preventionTips":["Mirror send-side reserves with receive-side reserves when tuning large messages","Never shrink queue reserves without re-validating internode_max_message_size","Run config validation in CI against the full set of internode limits"],"tags":["cassandra","configuration","internode"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}