From 630033b858a1394a9cbef9a25a332df477e5eefa Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 5 Mar 2025 12:57:44 -0800 Subject: [PATCH] fix(db): keep db connections alive for longer to prevent issues in dev --- db/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/index.ts b/db/index.ts index 6896461e14..7185d31984 100644 --- a/db/index.ts +++ b/db/index.ts @@ -51,6 +51,8 @@ if (!isLocalStorage) { // Disable prefetch as it is not supported for "Transaction" pool mode const client = postgres(connectionString, { prepare: false, + idle_timeout: 30, // Keep connections alive for 30 seconds when idle + connect_timeout: 30, // Timeout after 30 seconds when connecting }) db = drizzle(client) } else {