Planetscale + Prisma Connection Pool Limits

Does anyone understand connection pool limits? I'm a noob and am running into this issue:
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: 17)
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: 17)
Is it as simple as adding a custom connection limit in the database connection URL? Any context on how connection pools operate in serverless infra would be very helpful, just trying to understand this more. Thanks ❤️
8 Replies
Neto
Neto2y ago
You are probably opening a new connection on every page reload prisma is but still Are you using t3 stack?
/justin
/justinOP2y ago
Yes using T3 stack, why would a new connection be opened on every page load? Is that the default behavior? And shouldn't connections auto close when the code is done executing?
Neto
Neto2y ago
Is the issue on production or local?
/justin
/justinOP2y ago
Just experienced it on local for the first time right now, but became aware of the issue from a webhook event (on production) that should have been firing that seemed to always fail because of that error.
Neto
Neto2y ago
Weird
Neto
Neto2y ago
GitHub
create-t3-app/client.ts at next · t3-oss/create-t3-app
The best way to start a full-stack, typesafe Next.js app - create-t3-app/client.ts at next · t3-oss/create-t3-app
Neto
Neto2y ago
This specific piece of code should avoid that If not, something else is opening new connections
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server