Hive
fix(kura): derive FD pool from process capacity
GitHub issue · Closed
Source
tuist/tuist #11148
Updated
Jun 24, 2026
Domains
Kura
Resolves https://github.com/tuist/tuist/issues/11132
This adjusts Kura’s file descriptor admission control for bursty REAPI ByteStream uploads:
- Raise the soft
RLIMIT_NOFILEbefore loading config so dynamic defaults are derived from the real process capacity. - Derive the internal FD pool and segment handle cache from the detected limit while keeping bounded headroom and the existing 5s acquire timeout.
- Stop pinning Helm’s default FD pool and segment cache values so production deployments use dynamic sizing unless explicitly overridden.
- Return
RESOURCE_EXHAUSTEDfor REAPI ByteStream writes when the FD pool is exhausted, instead of surfacing it as an internal CAS persistence failure.
How to test locally
mise exec -- cargo fmtgit diff --checkmise exec -- cargo test config::tests --libmise exec -- cargo test reapi::tests::bytestream_writes_persist_completely_under_concurrency --libhelm template kura ./kura/ops/helm/kurahelm template kura ./kura/ops/helm/kura --set config.fileDescriptors.poolSize=2048 --set config.fileDescriptors.segmentHandleCacheSize=128
No GitHub comments yet.