Connection Pool
Whenever traffic picks up, my app crashes with `too many clients already`, and AI told me to use a pooled connection URL—what is that?
too many clients. A connection pool reuses a capped set of channels and queues extra callers, though forgetting to release borrowed connections can still exhaust the pool.You can say this to an AI Agent
Ready to paste into Cursor, Claude Code, or CodexCheck whether the database client creates a new connection pool on every request or dev hot-reload. Consolidate it into a shared singleton pool with sensible max connections and acquire timeouts, and make sure error paths release connections. For serverless deployments, switch to the pooled connection string and run a concurrency test to confirm `too many clients` is gone.
