From b84f30e9e7495dffba2d376acbe5e32b2581aeac Mon Sep 17 00:00:00 2001 From: Waleed Date: Wed, 18 Mar 2026 02:20:55 -0700 Subject: [PATCH] fix(db): reduce connection pool sizes to prevent exhaustion (#3649) --- apps/sim/socket/database/operations.ts | 2 +- packages/db/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/socket/database/operations.ts b/apps/sim/socket/database/operations.ts index aad62ef8b3..60cfa177e6 100644 --- a/apps/sim/socket/database/operations.ts +++ b/apps/sim/socket/database/operations.ts @@ -29,7 +29,7 @@ const socketDb = drizzle( prepare: false, idle_timeout: 10, connect_timeout: 20, - max: 15, + max: 10, onnotice: () => {}, }), { schema } diff --git a/packages/db/index.ts b/packages/db/index.ts index 186b076aba..0cab65a38e 100644 --- a/packages/db/index.ts +++ b/packages/db/index.ts @@ -14,7 +14,7 @@ const postgresClient = postgres(connectionString, { prepare: false, idle_timeout: 20, connect_timeout: 30, - max: 30, + max: 10, onnotice: () => {}, })