Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase File size limitation for /serve #619

Open
phaer opened this issue Jan 4, 2024 · 1 comment
Open

Increase File size limitation for /serve #619

phaer opened this issue Jan 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@phaer
Copy link

phaer commented Jan 4, 2024

Hello!

/api/v1/cache/{name}/serve/{storehash}/{filepath} is currently limited to 100MB per file.

Increasing this limit would be useful to download nix-built images directly from the cache, even if nix is not (yet) available i.e. in bootstrapping scenarios.

We've discussed this in #cachix:matrix.org in 2022 and iirc the problem back then was that whole nar files needed to be loaded into memory and so larger file would be prohibitively expensive in terms of RAM.

Is this still the case? Is serving larger files a use-case you want to support?


My use-case at hand is that in nixos-images PRs are built and pushed to cachix already. If the limit was at least 500MB or even 1GB or more, we could just output a cachix serve url for the kexec installer bundles directly. This is compared to downloading the same path on an existing nixos host and mirroring it via HTTP manually.

i.e. (not pinned might be gc'ed)

nixos-anywhere --kexec https://app.cachix.org/api/v1/cache/numtide/serve/i84hj2wbg6lggb0fga4hsfxvj9x2805f/nixos-kexec-installer-x86_64-linux.tar.gz ...
@domenkozar domenkozar added the enhancement New feature or request label Jan 8, 2024
@domenkozar
Copy link
Member

Hey @phaer will do :)

The main limitation is that https://github.com/haskell-nix/hnix-store currently doesn't expose the api we need, so we'll have to fix the parser implementation for nars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants