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

Error out of there's more than 10k parts #639

Open
cmoog opened this issue Apr 30, 2024 · 6 comments
Open

Error out of there's more than 10k parts #639

cmoog opened this issue Apr 30, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@cmoog
Copy link

cmoog commented Apr 30, 2024

When pushing a very large derivation to the cache, it seems cachix may choose a chunk size that results in > 10,000 parts. This results in a 400 response code from S3 upon reaching partNumber = 10001.

The S3 API specifies.

partNumber
Part number of part being uploaded. This is a positive integer between 1 and 10,000.
Required: Yes

@sandydoo
Copy link
Member

sandydoo commented May 1, 2024

@cmoog, how large is the derivation you're uploading?

We bumped the default to 32MiB in 1.7.2. That gets you a max of 320GiB per derivation. You can also increase the --chunk-size up to 5GiB and adjust num-concurrent-chunks to control memory usage.

It'd be nice to have a warning for NARs that would exceed the part limit , but we compress on-the-fly and have no way of knowing the final size of the compressed NAR, unless we just set an arbitrary limit for uncompressed NARs.

@cmoog
Copy link
Author

cmoog commented May 1, 2024

The uncompressed derivation was 215.94 GiB. That's good to know regarding version 1.7.2, I encountered this error with 1.6.1.

It'd be nice to have a warning for NARs that would exceed the part limit , but we compress on-the-fly and have no way of knowing the final size of the compressed NAR, unless we just set an arbitrary limit for uncompressed NARs.

Perhaps just a nice error message when partNumber exceeds 10,000 would be helpful– it could include a suggestion to use the flags that you mentioned for controlling chunk size.

@sandydoo
Copy link
Member

sandydoo commented May 1, 2024

If you don't mind me asking, what are you working on that creates such large derivations?

@cmoog
Copy link
Author

cmoog commented May 1, 2024

A 3rd party proprietary toolchain included inside a system profile.

@domenkozar domenkozar added the bug Something isn't working label May 22, 2024
@domenkozar
Copy link
Member

@cmoog any success with 1.7?

@cmoog
Copy link
Author

cmoog commented May 25, 2024

Yes, got those pushed with 1.7.3! Thank you.

@domenkozar domenkozar changed the title s3 multipart upload invalid partId, 400 response from s3 Error out of there's more than 10k parts May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants