fix(install): limit preparer concurrency to prevent file handle exhaustion#17633
fix(install): limit preparer concurrency to prevent file handle exhaustion#17633denyszhak wants to merge 3 commits intoastral-sh:mainfrom
Conversation
|
Not sure why test job is failing, seems unrelated to the change at first. |
|
Yep the failure is unrelated: #17637 |
|
Interesting, I thought we were already using limits early but it seems we aren't. CC @charliermarsh for the preparer code. |
crates/uv-dispatch/src/lib.rs
Outdated
| sources: NoSources, | ||
| workspace_cache: WorkspaceCache, | ||
| concurrency: Concurrency, | ||
| source_distribution_limiter: Arc<Semaphore>, |
There was a problem hiding this comment.
We should really handle this better globally: #18156
There was a problem hiding this comment.
It should be enough to rebase this on top of the other PR once it lands.
There was a problem hiding this comment.
Let me wait then, I thought you plan handling this thing there as well
There was a problem hiding this comment.
I haven't looked into this one. I believe we can handle them semi-independently, #18156 should only remove the amount of plumbing here, while we still need to figure out the correct approach to the file locks in this PR. It's also fine by me if we land this one first and I rebase #18156 on top of it.
There was a problem hiding this comment.
I would wait for your merged first so this one can be more local on the exact thing it addresses
51390d1 to
2468a97
Compare
2468a97 to
949397f
Compare
Summary
Resolves #17512
Fixes an issue where uv could exhaust the operating system's file descriptor limit when installing projects with a large number of local dependencies, causing a "Too many open files (os error 24)" crash.
Test Plan
ulimit -n 256to set number of allowed descriptors to a low valuemkdir -p /tmp/airflow-testgit clone --depth 1 https://github.com/apache/airflow /tmp/airflow-testcd /tmp/airflow-test/Users/denyszhak/personal-repos/uv/target/debug/uv syncBug: Hit
Too many open files (os error 24) at path "/Users/denyszhak/.cache/uv/sdists-v9/editable/136c133a3434a0fa/.tmpZtqKQt"/Users/denyszhak/personal-repos/uv/target/debug/uv syncFix: Successfully
Resolved 922 packages in 10.82s