Repair Connection Pool Exhaustion

    by Mariusz Wrzeszczynski

    1

    Repair leaked or long-held connections, per-request client pools, fan-out saturation, retry amplification, and cleanup gaps without guessing pool sizes.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Our Node/TypeScript API uses Prisma/PostgreSQL. The pool is configured for 10 connections per instance, but each request opens a transaction, then calls two HTTP services before the transaction finishes. A bulk endpoint runs 20 items with Promise.all, and the retry wrapper can run a second transaction while the first attempt is still unwinding after timeout. Under load we get pool acquisition timeouts. Repair connection-pool exhaustion locally using Testcontainers and an intentionally small test pool. Do not connect to production, increase live pool size, change database server settings, or invent our production connection limit.

    Your agent does

    Pool saturation found. Transactions hold DB connections across HTTP calls, bulk Promise.all exceeds the local pool, and retry can overlap cleanup. The repair narrows connection hold time, bounds fan-out, orders retry after release, adds tiny-pool deterministic tests, and exposes acquire/hold metrics. Production connection capacity and final pool size remain unverified.

    What you get

    Eliminate connection leaks in transaction and session lifecycles.Prevent worker fan-out from saturating shared database pools.Audit HTTP and Redis client reuse to stop resource churn.Implement observability for pool wait times and acquisition latency.

    About this skill

    Connection pool exhaustion is often caused by lifecycle and concurrency mistakes rather than a pool that is simply too small. Transactions may hold connections across network I/O, clients may be recreated per request, worker fan-out may exceed available connections, and retries or streaming exceptions may retain resources.

    Repair Connection Pool Exhaustion gives an AI coding agent a repository workflow for tracing acquire/hold/release lifecycles, repairing client reuse and cleanup, shortening connection hold time, bounding local concurrency, fixing retry interaction, and validating behavior with intentionally small local pools.

    It does not connect to production services, change live pool/server limits, kill sessions, or invent production capacity.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Frequently Asked Questions

    Popular in Data Engineering