Perry Raskin
09/10/2021, 7:26 PMprisma.$disconnect()
method on all api endpoints, so i’m confused as to why this is an issue
Edit: I read some of the docs, and I set a global prisma
client, and removed all of the $disconnect
calls. It still seems to eat up the connections quickly, though.kailoon
09/11/2021, 4:47 AM$disconnect
method, I always assume that will solve this particular issue if I do it on all api endpoints.Perry Raskin
09/13/2021, 1:26 AMkailoon
09/13/2021, 2:28 AMkailoon
09/13/2021, 2:28 AMimport { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient({
log: process.env.NODE_ENV === "development" ? ["query", "info", "warn"] : [],
});
export { prisma, PrismaClient };