Hive Hive
Sign in

fix(kura): derive FD pool from process capacity

GitHub issue · Closed

Metadata
Source
tuist/tuist #11148
Updated
Jun 24, 2026
Domains
Kura
Details

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_NOFILE before 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_EXHAUSTED for 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 fmt
  • git diff --check
  • mise exec -- cargo test config::tests --lib
  • mise exec -- cargo test reapi::tests::bytestream_writes_persist_completely_under_concurrency --lib
  • helm template kura ./kura/ops/helm/kura
  • helm template kura ./kura/ops/helm/kura --set config.fileDescriptors.poolSize=2048 --set config.fileDescriptors.segmentHandleCacheSize=128
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.