apache/cassandra · error · ConfigurationException
paxos_cache_size option was set incorrectly to '<value>', su
Error message
paxos_cache_size option was set incorrectly to '<value>', supported values are <integer> >= 0.
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1044
catch (NumberFormatException e)
{
throw new ConfigurationException("counter_cache_size option was set incorrectly to '"
+ (conf.counter_cache_size != null ? conf.counter_cache_size.toString() : null) + "', supported values are <integer> >= 0.", false);
}
try
{
// if paxosCacheSizeInMiB option was set to "auto" then size of the cache should be "min(1% of Heap (in MB), 50MB)
paxosCacheSizeInMiB = (conf.paxos_cache_size == null)
? Math.min(Math.max(1, (int) (Runtime.getRuntime().totalMemory() * 0.01 / 1024 / 1024)), 50)
: conf.paxos_cache_size.toMebibytes();
if (paxosCacheSizeInMiB < 0)
throw new NumberFormatException(); // to escape duplicating error message
}
catch (NumberFormatException e)
{
throw new ConfigurationException("paxos_cache_size option was set incorrectly to '"
+ conf.paxos_cache_size + "', supported values are <integer> >= 0.", false);
}
try
{
// if accordCacheSizeInMiB option was set to "auto" then size of the cache should be "max(10% of Heap (in MB), 1MB)
accordCacheSizeInMiB = (conf.accord.cache_size == null)
? Math.max(1, (int) ((Runtime.getRuntime().totalMemory() * 0.10) / 1024 / 1024))
: conf.accord.cache_size.toMebibytes();
if (accordCacheSizeInMiB < 0)
throw new NumberFormatException(); // to escape duplicating error message
}
catch (NumberFormatException e)
{
throw new ConfigurationException("accord.cache_size option was set incorrectly to '"
+ conf.accord.cache_size + "', supported values are <integer> >= 0.", false);
}View on GitHub (pinned to 88fd0f6a0e)
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
Example fix
// before (cassandra.yaml) paxos_cache_size: 1MB // after paxos_cache_size: 50 // or paxos_cache_size: auto
Defensive patterns
Strategy: validation
Validate before calling
String v = yaml.get("paxos_cache_size");
if (v != null && !v.equals("auto") && Long.parseLong(v) < 0) throw new IllegalArgumentException(v); Try / catch
try { DatabaseDescriptor.daemonInitialization(); }
catch (ConfigurationException e) { LOG.fatal(e.getMessage()); System.exit(1); } Prevention
- 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)
When it happens
Trigger: Node startup with paxos_cache_size in cassandra.yaml that is negative, unit-suffixed, or otherwise not a bare integer.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- prepared_statements_cache_size option was set incorrectly to
- key_cache_size option was set incorrectly to '<value>', supp
- counter_cache_size option was set incorrectly to '<value>',
- accord.cache_size option was set incorrectly to '<value>', s
- Load CIDR groups cache operation not supported by %s
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/fd1fab17e9340a7a.
Report an issue: GitHub.