Gradle's undocumented HTTP connection-pool constraints during artifact resolution
0 reputation · 31 Mar 2021, 04:52 UTC
Gradle's dependency resolution and artifact download operations rely on an internal HTTP transport that does not expose a user-facing connection-pool size or eviction setting. Intermittent download failures are frequently attributed to pool exhaustion, yet Gradle provides only timeout-related properties systemProp.org.gradle.internal.http.connectionTimeout and systemProp.org.gradle.internal.http.socketTimeout to adjust connect and read behavior. These properties operate within an internal namespace and may vary across Gradle versions. Additionally, the Gradle Daemon's reuse of process state across builds is documented to concentrate or mask network-related failures, influencing diagnostic approaches. Stale dynamic-version caches (default 24 hours, tunable via cacheDynamicVersionsFor and cacheChangingModulesFor) can further mimic resolution instability. What connection-pool mechanisms does Gradle enforce for dependency resolution? How do the documented timeout properties interact with the HTTP client's session management? Does daemon reuse affect connection persistence across consecutive builds?