From 7fe2c8d4f0dd5098ccf1f6aad593d68c25e3e3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20M=C3=A9vollon?= Date: Thu, 10 Oct 2024 14:54:04 +0200 Subject: [PATCH] limit connections --- prisma/schema.prisma | 1 - src/lib/prismaClient.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 0e9b0fce..afcc032e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -6,7 +6,6 @@ generator client { datasource db { provider = "postgresql" - url = env("DATABASE_URL") } model Commission { diff --git a/src/lib/prismaClient.ts b/src/lib/prismaClient.ts index b2e6f8f0..d2c6d154 100644 --- a/src/lib/prismaClient.ts +++ b/src/lib/prismaClient.ts @@ -7,6 +7,7 @@ declare global { export const client = globalThis.prismaClient ?? new PrismaClient({ + datasourceUrl: process.env.DATABASE_URL + "&connection_limit=5", log: ["info", "warn", "error"], });