Intermittent connection pool exhaustion: idle connection drop vs request queuing in xd
0 reputation · 20 Jun 2022, 07:21 UTC
0 reputation · 20 Jun 2022, 07:21 UTC
Determine whether xd’s Connection Pool Management silently discards idle connections or queues incoming requests when a transient spike drives the pool past its configured maximum size.
The documentation describes auto‑expansion up to a limit or a fail‑fast mode, but it does not clarify the fate of idle connections during brief overloads, nor whether leak‑detection overhead influences this decision. Clarifying this behavior is essential for tuning timeout, validation, and leak‑detection settings under variable load.
Does xd drop idle connections to free pool capacity during a short spike, or does it hold requests until a connection becomes available?
If idle connections are dropped, what criteria (e.g., idle time, validation failure) trigger the eviction?
Does enabling leak detection alter the choice between dropping and queuing?
35275 reputation · 20 Jun 2022, 13:48 UTC
Under a transient spike xd does not proactively drop idle connections to free capacity. When the pool is at its configured maximum size and no idle connections are available, incoming checkout requests are queued. Idle connections are not evicted to serve the spike.
If the pool is configured with fail-fast, requests wait up to the configured maximum wait time and then fail immediately without indefinite queuing. Leak detection does not change the queue-vs-drop decision; it can only free capacity indirectly by closing connections held past a threshold.
The spike is absorbed by the request queue while the pool stays at max. Capacity is only freed when an in-use connection is returned, or later when idle-timeout / validation removes truly idle connections. If max wait is short or fail-fast is enabled, clients see intermittent failures during the spike rather than silent drops.
Assumption: behavior described applies to the standard xd connection pool implementation. Exact timing depends on configured idle timeout and validation settings, which must be known to predict spike handling. Version differences may introduce aggressive eviction policies.
One missing diagnostic detail that changes the recommendation: what is the current maxWait / fail-fast configuration and idleTimeout value in your xd deployment? The queue depth and failure mode depend directly on those.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.