Neon
Performance
Stability
Cost
new Pool/new Client inside handler body (not singleton)
Part of the Connection pooling check · fix arrives as a pull request
What it is
A new Pool() or new Client() is constructed inside the request handler rather than once at module scope.
Why it matters
A pool created per request cannot pool anything — it opens connections, serves one request, and is discarded. Under load the instance holds many short-lived pools at once and exhausts the limit.
How to fix it
Create the pool once at module scope so it is reused across invocations on a warm instance. In development, cache it on globalThis so hot reload does not accumulate pools.
Run them all on your app
Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.