# Pool exhaustion
Full text: `WaitQueueTimeoutError: Timed out while checking out a connection from connection pool` (wording varies by driver). All `maxPoolSize` connections are checked out and busy past `waitQueueTimeoutMS`.
## Confirm
1. Count your clients: app instances x clients per instance. The classic bug is a new client per request or per serverless invocation, which multiplies pools without bound.
2. Check for slow operations holding connections: the Real-Time Performance Panel or currentOp shows long-running ops hogging the pool.
3. Check the Atlas Connections metric: flat at the cap means genuine exhaustion; climbing without bound means a leak.
## Fix
- Share one client per process. This fixes most cases outright.
- Fix the slow queries first. Raising `maxPoolSize` on top of slow queries just moves the queue.
- Only then raise `maxPoolSize` to match measured concurrent demand, or raise `waitQueueTimeoutMS` if bursts are brief.
## Verify
Under the same load, the Connections metric plateaus below the cap and the wait-queue errors stop.