Timed out fetching a new connection from the connection pool
We're using prisma on vercel, to connect to supabase with the pgbouncer.
We set the connection limit to3, timout to 60sec, but we still get this error when the traffic goes up.
Since its in a serverless environment, multiple function invocation can happen at the same time, and it appears Vercel somehow stops the functions (or freezes them ?) at the end of each request.
I've tested many approaches to solve this issue, including large number of pool connections, tbut nothing helps. And we're paying a supabase medium instance, I"ve increased the number of connections etc..
Help ?
12 Replies
You selected to wait for the human sages. They'll share their wisdom soon.
Grab some tea while you wait, or check out
#ask-ai
if you'd like a quick chat with the bot anyway!Hi @Nurul (Prisma) by any chance, did you ever have a similar issue ?
Database connections | Prisma Documentation
Databases connections
yes I read it many times 🙁 @RaphaelEtim
Did you follow the guide to set the initial connection_limit initially to 1 and observe if the error appears before tuning the pool timeout?
Also, can you please let us know what version of Prisma you are on?
sry didnt receive the notification, I tried and for now it looks ok
prisma v6.3.1
No worries. Let us know if u run into any issues again.
We just had the issues again this morning
Here's a stat query I ran to see the activity btw

here's the parameters we used :
/postgres?pgbouncer=true&connection_limit=1&pool_timeout=10
I got the same issue. AWS Fargate with MySQL. https://github.com/prisma/prisma/discussions/9273
Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 10, connection limit: 3)
GitHub
Usage with AWS ECS Fargate: Connection pool-size for VCPU's? · pris...
Hi folks, I assume I might now be the only one who uses prisma with aws ecs containers. While it works, I realize the connection is pretty much chugging, and I wonder whether this is because of som...
Connection pool | Prisma Documentation
Prisma ORM's query engine creates a connection pool to store and manage database connections.
@Sebosss From the logs, you shared, i can see
idle in transaction
state which typically happens when a transaction is started but not completed. This can occur if a query or transaction is initiated but not properly closed or committed. Can you incrementally increase the connection_limit to see if it helps? You may also try changing the pool_timeout to say 0 or a higher number to observe as well