{"record":{"id":"fd1fab17e9340a7a","repo":"apache/cassandra","slug":"paxos-cache-size-option-was-set-incorrectly-to-v","errorCode":null,"errorMessage":"paxos_cache_size option was set incorrectly to '<value>', supported values are <integer> >= 0.","messagePattern":"paxos_cache_size option was set incorrectly to '<value>', supported values are <integer> >= 0\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1044,"sourceCode":"        catch (NumberFormatException e)\n        {\n            throw new ConfigurationException(\"counter_cache_size option was set incorrectly to '\"\n                                             + (conf.counter_cache_size != null ? conf.counter_cache_size.toString() : null) + \"', supported values are <integer> >= 0.\", false);\n        }\n\n        try\n        {\n            // if paxosCacheSizeInMiB option was set to \"auto\" then size of the cache should be \"min(1% of Heap (in MB), 50MB)\n            paxosCacheSizeInMiB = (conf.paxos_cache_size == null)\n                                  ? Math.min(Math.max(1, (int) (Runtime.getRuntime().totalMemory() * 0.01 / 1024 / 1024)), 50)\n                                  : conf.paxos_cache_size.toMebibytes();\n\n            if (paxosCacheSizeInMiB < 0)\n                throw new NumberFormatException(); // to escape duplicating error message\n        }\n        catch (NumberFormatException e)\n        {\n            throw new ConfigurationException(\"paxos_cache_size option was set incorrectly to '\"\n                                             + conf.paxos_cache_size + \"', supported values are <integer> >= 0.\", false);\n        }\n\n        try\n        {\n            // if accordCacheSizeInMiB option was set to \"auto\" then size of the cache should be \"max(10% of Heap (in MB), 1MB)\n            accordCacheSizeInMiB = (conf.accord.cache_size == null)\n                                  ? Math.max(1, (int) ((Runtime.getRuntime().totalMemory() * 0.10) / 1024 / 1024))\n                                  : conf.accord.cache_size.toMebibytes();\n\n            if (accordCacheSizeInMiB < 0)\n                throw new NumberFormatException(); // to escape duplicating error message\n        }\n        catch (NumberFormatException e)\n        {\n            throw new ConfigurationException(\"accord.cache_size option was set incorrectly to '\"\n                                             + conf.accord.cache_size + \"', supported values are <integer> >= 0.\", false);\n        }","sourceCodeStart":1026,"sourceCodeEnd":1062,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1026-L1062","documentation":"ConfigurationException raised in applySimpleConfig when the paxos_cache_size yaml value cannot be parsed as the expected numeric/auto form (NumberFormatException caught around its parsing, mirroring the counter_cache_size guard shown). It fires at startup or config apply when the value's format is invalid, not when the size is merely large.","triggerScenarios":"Node startup with paxos_cache_size in cassandra.yaml that is negative, unit-suffixed, or otherwise not a bare integer.","commonSituations":"Copying the key name from a different Cassandra version where it did not exist and supplying a units string; typos like '1OO' with a letter O; negative values.","solutions":["Set paxos_cache_size to a plain non-negative integer of MiB, e.g. 50","Use 'auto' for min(1% of heap, 50MiB)","Remove the key to accept the default","Restart the node"],"exampleFix":"// before (cassandra.yaml)\npaxos_cache_size: 1MB\n// after\npaxos_cache_size: 50\n// or\npaxos_cache_size: auto","handlingStrategy":"validation","validationCode":"String v = yaml.get(\"paxos_cache_size\");\nif (v != null && !v.equals(\"auto\") && Long.parseLong(v) < 0) throw new IllegalArgumentException(v);","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialization(); }\ncatch (ConfigurationException e) { LOG.fatal(e.getMessage()); System.exit(1); }","preventionTips":["Bare integer MiB or 'auto' only","Verify keys exist in your Cassandra version before adding them","Scan configs for OCR-like typos (letter O vs zero)"],"tags":["cassandra","configuration","cache","paxos"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}