You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At high request-admission ceilings this creates and retains a very large shared httpcore connection pool, even when the async scheduler can expose far fewer concurrent model requests. httpcore.AsyncConnectionPool._assign_requests_to_connections() and connection is_idle() checks scan Python connection state on the event-loop thread, so an oversized pool can become a dominant GIL cost.
The model request-admission ceiling and HTTP transport-pool capacity represent different concerns and should not be coupled linearly without a bound or independent control.
This configures 16,384 total connections and 8,192 keepalive connections before any workload-specific client concurrency is considered.
For the runtime symptom, run a large asynchronous workload with a high model request ceiling and a lower scheduler task limit, then capture a GIL-only profile. Connection assignment and idle checks consume substantial event-loop CPU even though the useful concurrent request population is much smaller than the configured pool.
Expected behavior
Data Designer should size the HTTP pool from expected transport concurrency rather than directly from the model request-admission ceiling. A supported solution could provide independently configurable, validated transport limits with bounded defaults.
The implementation should:
Preserve enough connections to sustain configured useful concurrency.
Avoid retaining thousands of connections when scheduler demand is materially lower.
Expose the effective transport limits for diagnostics.
No existing issue was found for the high-concurrency inverse of #459. That issue correctly ensured that max_parallel_requests affected the real transport pool, but the current direct 2x/1x sizing policy becomes expensive at much larger values.
In a controlled GIL-only profile, HTTP connection and transport work accounted for 52.45% of samples. After removing an independent request-admission queue bottleneck, it accounted for 75.39% and became the dominant remaining client cost. The largest leaves were _assign_requests_to_connections() and connection is_idle() variants.
The profile showed one event-loop thread consuming the client CPU while other host CPU capacity remained available. Request completion was balanced and successful, which points to client-side transport bookkeeping rather than endpoint routing or error handling.
Additional context
Related: #459. This issue is not requesting that the pool return to the old fixed limit. It requests a transport-capacity model that remains correct at both moderate and very high request-admission ceilings.
Checklist
I reproduced this issue or provided a minimal example
I searched the docs/issues myself, or had my agent do so
If I used an agent, I included its diagnostics above
Priority Level
High (Major functionality broken)
Describe the bug
HttpModelClientderives HTTP transport limits directly frommax_parallel_requests:At high request-admission ceilings this creates and retains a very large shared
httpcoreconnection pool, even when the async scheduler can expose far fewer concurrent model requests.httpcore.AsyncConnectionPool._assign_requests_to_connections()and connectionis_idle()checks scan Python connection state on the event-loop thread, so an oversized pool can become a dominant GIL cost.The model request-admission ceiling and HTTP transport-pool capacity represent different concerns and should not be coupled linearly without a bound or independent control.
Steps/Code to reproduce bug
This configures 16,384 total connections and 8,192 keepalive connections before any workload-specific client concurrency is considered.
For the runtime symptom, run a large asynchronous workload with a high model request ceiling and a lower scheduler task limit, then capture a GIL-only profile. Connection assignment and idle checks consume substantial event-loop CPU even though the useful concurrent request population is much smaller than the configured pool.
Expected behavior
Data Designer should size the HTTP pool from expected transport concurrency rather than directly from the model request-admission ceiling. A supported solution could provide independently configurable, validated transport limits with bounded defaults.
The implementation should:
Agent Diagnostic / Prior Investigation
No existing issue was found for the high-concurrency inverse of #459. That issue correctly ensured that
max_parallel_requestsaffected the real transport pool, but the current direct2x/1xsizing policy becomes expensive at much larger values.In a controlled GIL-only profile, HTTP connection and transport work accounted for 52.45% of samples. After removing an independent request-admission queue bottleneck, it accounted for 75.39% and became the dominant remaining client cost. The largest leaves were
_assign_requests_to_connections()and connectionis_idle()variants.The profile showed one event-loop thread consuming the client CPU while other host CPU capacity remained available. Request completion was balanced and successful, which points to client-side transport bookkeeping rather than endpoint routing or error handling.
Additional context
Related: #459. This issue is not requesting that the pool return to the old fixed limit. It requests a transport-capacity model that remains correct at both moderate and very high request-admission ceilings.
Checklist