quickwit-oss/quickwit · error

max_queue_disk_usage must be at least 256 MiB, got

Error message

max_queue_disk_usage must be at least 256 MiB, got `{}`

What it means

The ingest (shard queue) config validation enforces a minimum queue disk usage of 256 MiB. Values at or below `ByteSize::mib(256)` are rejected because extremely small on-disk queues cause pathological behavior (constant rollofs) — note the check is strictly `>` 256 MiB, so exactly 256 MiB also fails.

Solutions

  1. Raise `max_queue_disk_usage` above 256 MiB (e.g. `512mib`)
  2. Remove the explicit setting to use the default value
  3. Check the unit suffix — `256mib` fails; use `257mib` or larger

Example fix

// before
max_queue_disk_usage: 256mib
// after
max_queue_disk_usage: 512mib
Defensive patterns

Strategy: validation

Validate before calling

fn ensure_queue_disk_usage(v: ByteSize) -> anyhow::Result<()> {
    if v <= ByteSize::mib(256) {
        anyhow::bail!("max_queue_disk_usage must exceed 256 MiB, got {}", v.display().si());
    }
    Ok(())
}

Try / catch

if let Err(e) = ingest_config.validate() {
    if e.to_string().contains("max_queue_disk_usage must be at least 256 MiB") {
        eprintln!("Raise max_queue_disk_usage above 256 MiB (strictly greater).");
    }
}

Prevention

When it happens

Trigger: Setting `max_queue_disk_usage` in the node config to a value like 128mib, 100mb, or exactly 256mib, then validating the node config (startup).

Common situations: Trying to minimize disk footprint on small/test nodes; copy-pasting a low value from a benchmark config; confusing MiB with MB and setting a smaller effective size.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/fc04693fac561cdb. Report an issue: GitHub.

Appendix: source

Thrown at quickwit/quickwit-config/src/node_config/mod.rs:807

    pub fn decommission_timeout(&self) -> Duration {
        quickwit_common::get_duration_from_env(
            "QW_INGEST_DECOMMISSION_TIMEOUT",
            Duration::from(self.decommission_timeout.clone()),
        )
    }

    pub fn grpc_compression_encoding(&self) -> Option<CompressionEncoding> {
        self.grpc_compression_algorithm
            .as_ref()
            .map(|algorithm| match algorithm {
                CompressionAlgorithm::Gzip => CompressionEncoding::Gzip,
                CompressionAlgorithm::Zstd => CompressionEncoding::Zstd,
            })
    }

    fn validate(&self) -> anyhow::Result<()> {
        self.warn_if_replication_factor_is_set();
        ensure!(
            self.max_queue_disk_usage > ByteSize::mib(256),
            "max_queue_disk_usage must be at least 256 MiB, got `{}`",
            self.max_queue_disk_usage.display().si()
        );
        ensure!(
            self.max_queue_disk_usage >= self.max_queue_memory_usage,
            "max_queue_disk_usage ({}) must be at least max_queue_memory_usage ({})",
            self.max_queue_disk_usage.display().si(),
            self.max_queue_memory_usage.display().si()
        );
        info!(
            "ingestion shard throughput limit: {}",
            self.shard_throughput_limit.display().si()
        );
        ensure!(
            self.shard_throughput_limit >= ByteSize::mib(1)
                && self.shard_throughput_limit <= ByteSize::mib(20),
            "shard_throughput_limit ({}) must be within 1mb and 20mb",

View on GitHub (pinned to a39730c5cd)