Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection
...
5 Replies
(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 idleMaybe its a reason why i see error from prisma because there are many idle connections?
I think prisma should close connections created using queryRaw
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.
Hello. I use not latest prisma version, i will try updating later.
$disconnect i use onModuleDestroy in nest.js