apache/cassandra · error · ConfigurationException

Invalid value of compaction_throughput:

Error message

Invalid value of compaction_throughput: 

What it means

Thrown when compaction_throughput in MiB/s is >= Integer.MAX_VALUE; the compaction rate limiter stores the rate as an int, so DatabaseDescriptor rejects values that would overflow at startup with this ConfigurationException.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1324

        if (conf.inter_dc_stream_throughput_outbound.toMegabitsPerSecond() >= Integer.MAX_VALUE)
        {
            throw new ConfigurationException("Invalid value of inter_dc_stream_throughput_outbound: " + conf.inter_dc_stream_throughput_outbound.toString(), false);
        }

        if (conf.entire_sstable_stream_throughput_outbound.toMebibytesPerSecond() >= Integer.MAX_VALUE)
        {
            throw new ConfigurationException("Invalid value of entire_sstable_stream_throughput_outbound: " + conf.entire_sstable_stream_throughput_outbound.toString(), false);
        }

        if (conf.entire_sstable_inter_dc_stream_throughput_outbound.toMebibytesPerSecond() >= Integer.MAX_VALUE)
        {
            throw new ConfigurationException("Invalid value of entire_sstable_inter_dc_stream_throughput_outbound: " + conf.entire_sstable_inter_dc_stream_throughput_outbound.toString(), false);
        }

        if (conf.compaction_throughput.toMebibytesPerSecond() >= Integer.MAX_VALUE)
        {
            throw new ConfigurationException("Invalid value of compaction_throughput: " + conf.compaction_throughput.toString(), false);
        }
    }

    @VisibleForTesting
    static void applyConcurrentValidations(Config config)
    {
        if (config.concurrent_validations < 1)
        {
            config.concurrent_validations = config.concurrent_compactors;
        }
        else if (config.concurrent_validations > config.concurrent_compactors && !allowUnlimitedConcurrentValidations)
        {
            throw new ConfigurationException("To set concurrent_validations > concurrent_compactors, " +
                                             "set the system property -D" + ALLOW_UNLIMITED_CONCURRENT_VALIDATIONS.getKey() + "=true");
        }
    }

    @VisibleForTesting

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Reduce compaction_throughput to a sane value below Integer.MAX_VALUE MiB/s (e.g. 64MiB)
  2. Use 0 (or the version's documented disabled value) to effectively remove the throttle
  3. Check the unit suffix for typos
  4. Re-run startup after fixing; the exception message shows the offending value

Example fix

// before (cassandra.yaml)
compaction_throughput: 4294967296MiB
// after
compaction_throughput: 64MiB
Defensive patterns

Strategy: validation

Validate before calling

long v = conf.compaction_throughput.toMebibytesPerSecond();
if (v < 0 || v >= Integer.MAX_VALUE) throw new IllegalArgumentException("compaction_throughput out of range: " + v);

Try / catch

try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { LOG.error("Bad compaction_throughput: " + e.getMessage()); System.exit(1); }

Prevention

When it happens

Trigger: compaction_throughput in cassandra.yaml (or via Config) set to a value whose toMebibytesPerSecond() >= 2147483647, during config application at node startup.

Common situations: Unit typo (e.g. writing bytes instead of MiB); operator attempting 'unlimited compaction throughput' with an extreme number; generated configs from tooling with wrong scaling.

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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/bc6d8c3037605591. Report an issue: GitHub.