jdx/mise · error

registry archive entry is too large

Error message

registry archive entry is too large

What it means

While tracking registry archive entries, mise checks each entry's declared size against MAX_REGISTRY_ARCHIVE_ENTRY_SIZE. A single entry larger than this cap is rejected — another decompression-bomb guard so one huge registry file cannot exhaust memory when read into a String.

Source

Thrown at src/registry.rs:376

    }

    ensure!(
        !sources.is_empty(),
        "archive does not contain registry entries"
    );
    registry_from_sources(sources)
}

fn track_registry_archive_entry(
    index: usize,
    entry_size: u64,
    archive_size: &mut u64,
) -> Result<()> {
    ensure!(
        index < MAX_REGISTRY_ARCHIVE_ENTRIES,
        "registry archive contains too many entries"
    );
    ensure!(
        entry_size <= MAX_REGISTRY_ARCHIVE_ENTRY_SIZE,
        "registry archive entry is too large"
    );
    *archive_size = archive_size
        .checked_add(entry_size)
        .ok_or_else(|| eyre::eyre!("registry archive size overflow"))?;
    ensure!(
        *archive_size <= MAX_REGISTRY_ARCHIVE_SIZE,
        "registry archive is too large"
    );
    Ok(())
}

fn registry_from_sources(sources: BTreeMap<String, String>) -> Result<Registry> {
    let mut entries = BTreeMap::new();
    let mut missing_version_order = false;
    for (short, source) in sources {
        let value: toml::Value = toml::from_str(&source)

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Re-download the registry archive from the official source; a corrupted or tampered file is the usual cause.
  2. List entry sizes (`tar -tvzf archive.tar.gz`) to find the oversized entry and remove it from the packaging input if you publish the registry.
  3. Split legitimately huge registry content into multiple smaller entry files instead of one giant file.
Defensive patterns

Strategy: validation

Validate before calling

# shell: find entries above a per-file size bound before parsing
tar -tvzf registry.tar.gz | awk '$3 > 10485760 {print $NF, $3}'

Prevention

When it happens

Trigger: parse_registry_archive encountering a single archive entry whose uncompressed size exceeds MAX_REGISTRY_ARCHIVE_ENTRY_SIZE.

Common situations: A malicious registry archive with one massive entry, a corrupted download reporting wrong sizes, or a publisher accidentally embedding a large vendored blob (lockfile dump, binary asset) in the registry.

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/84c741829ee0e51a. Report an issue: GitHub.