Hey prismasters I have a bit of a problem. My app ...
# prisma-client
l
Hey prismasters I have a bit of a problem. My app works well for quite some time, just to get stuck in a loop of promise rejections.
Copy code
2021-09-22T08:32:41.838273674Z (node:27) UnhandledPromiseRejectionWarning: Error:
2021-09-22T08:32:41.838296175Z Invalid `prisma.user.findFirst()` invocation:
2021-09-22T08:32:41.838369076Z
2021-09-22T08:32:41.838374676Z
2021-09-22T08:32:41.838378576Z   Timed out fetching a new connection from the connection pool. (More info: <http://pris.ly/d/connection-pool>, Current connection limit: 3)
2021-09-22T08:32:41.838395576Z     at PrismaClientFetcher.<anonymous> (/usr/src/app/dist/apps/api/main.js:39266:31)
2021-09-22T08:32:41.838400576Z     at Generator.throw (<anonymous>)
2021-09-22T08:32:41.838404576Z     at rejected (/usr/src/app/node_modules/tslib/tslib.js:115:69)
This is the issue that keeps popping up, I'm guessing the findFirst isn't even the problem but rather my connections. I'm running this on the azure app service so I was also wondering if I could increase my connection limit or if that's useless without more cpu cores. Grateful for any hints from you side 🙂
r
@Lukas Heddendorp 👋 Are you on Serverless?
l
Hey @Ryan I'm not. Running a regular node server on the app service although serverless might be an idea looking at the burst like traffic I have
r
Could you try increasing the
connection_limit
and
pool_timeout
values as shown here and check?
l
What would be a reasonable connection limit with 1 core?
r
You could try having around 5-6, depending on how much traffic you’re receiving.
✅ 1