Homebrew 3.6.0 connection pool exhaustion under concurrent `brew install` causing intermittent failures
0 reputation · 09 Mar 2020, 04:55 UTC
Diagnosing intermittent connection pool exhaustion in Homebrew 3.6.0
Homebrew 3.6.0 reuses HTTP connections per formula but does not expose a configurable maximum, causing occasional exhaustion when many formulae are installed concurrently, especially in CI pipelines. The pool size is derived from CPU core count and can only be overridden via the undocumented HOMEBREW_CONNECTION_POOL_SIZE environment variable, which lacks official documentation and may be removed in future releases. This represents a stability regression from Homebrew 3.5.x where the pool size was fixed. Administrators need a reliable way to mitigate intermittent failures without depending on undocumented configuration.
What methods can reliably set a persistent connection pool size for Homebrew 3.6+ without using undocumented variables? Will the HOMEBREW_CONNECTION_POOL_SIZE variable remain supported in upcoming Homebrew versions? Can Homebrew introduce a documented configuration option for connection pool size to eliminate intermittent exhaustion?