P
Prisma•5d ago
Erkoze

Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection

...
5 Replies
Erkoze
ErkozeOP•5d ago
(Current connection pool timeout: 10, connection limit: 140) Commonly see that error, it breaks API work every time this error occure If i will run SELECT * FROM pg_stat_activity in postgres (from DBeaver) i will see many connections created using prisma queryRaw and their state are idle
Erkoze
ErkozeOP•5d ago
No description
Erkoze
ErkozeOP•5d ago
Maybe its a reason why i see error from prisma because there are many idle connections? I think prisma should close connections created using queryRaw
Nurul
Nurul•5d ago
Hello @Erkoze 👋 Are you using latest prisma version? Can you try using $disconnect explicitly to close the connections? https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/databases-connections/connection-management#calling-disconnect-explicitly
Connection management | Prisma Documentation
This page explains how database connections are handled with Prisma Client and how to manually connect and disconnect your database.
Erkoze
ErkozeOP•4d ago
Hello. I use not latest prisma version, i will try updating later. $disconnect i use onModuleDestroy in nest.js

Did you find this page helpful?