Concurrent store operations should be rate-limited #1022
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1022
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Copying to a local path store doesn't work
Steps To Reproduce
Expected behavior
nix copyjust worksnix --versionoutputAdditional context
Add any other context about the problem here.
tonix copy --to ./pathornix copy --to file:///pathdoesn't work - "Too many open files"nix copy --derivation --to ./pathornix copy --derivation --to file:///pathdoesn't work - "Too many open files"It does work after raising file limits. But feels like lix should be managing raising those file limits itself.
Yeah, we have a backpressure problem here. We are sending way too many requests.
This is the root cause, we are calling this function too much at the same time as our upload process can keep up but our mechanism to bookkeep info like the nar hash, the compressed file and so on are not keeping up.
tonix copy --derivation --to ./pathornix copy --derivation --to file:///pathdoesn't work - "Too many open files"BinaryCache::addToStoreCommonshould stream the compressed file contentsI think the renaming of this issue is inaccurate
I'm running into the issue with both
file://(which is just Binary cache store in a trench coat) but also with./(which is local file store. And doesn't involve NARs. Afaik)@arianvp I don't see how the local file store can cause this, can you provide me with your reproducer please?
But that code path is the only place that creates temporary files.
I think the fix ultimately is to rate limit concurrent store operations.
to Concurrent store operations should be rate-limitedBinaryCache::addToStoreCommonshould stream the compressed file contentssigh @pennae is omniscient
in the local binary store
Anyway, rate limiting ANY store operation should do the trick.
The reproducer is in the original issue:
Which creates a proper store (with a sqlite DB etc) but I also get file limit errors
@arianvp We have a fix, I will submit it soon after we performance regress test it.
This issue was mentioned on Gerrit on the following CLs:
@arianvp Please test again and reopen if the bug is still present.