R
Railway10mo ago
Garcia

Problem with Prisma

I have a problem with prisma and my db PostgreSql, whats i can resolve this? Error querying the database: FATAL: sorry, too many clients already My database url contains: ?connection_limit=20&pool_timeout=0&connect_timeout=300
10 Replies
Percy
Percy10mo ago
Project ID: 8140907c-d91e-4495-8289-d77c9283a314
Garcia
GarciaOP10mo ago
8140907c-d91e-4495-8289-d77c9283a314
Brody
Brody10mo ago
are you connecting to your database from a serverless environment like vercel?
Garcia
GarciaOP10mo ago
i connect simply, using database url, with my project containing my db and my back-end, with NestJS and Prisma its direct connection
Brody
Brody10mo ago
so the app that is connecting to the database is hosted on railway
Garcia
GarciaOP10mo ago
yes
Brody
Brody10mo ago
you might be opening a new connection for every query, maybe check out this docs page https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/nextjs-prisma-client-dev-practices
Garcia
GarciaOP10mo ago
my project is with nestjs, but its maybe resolved my problem, thanks
Brody
Brody10mo ago
yep should still be applicable at a high level
Garcia
GarciaOP10mo ago
ok
Want results from more Discord servers?
Add your server