From c3e5fe6abfdb896af40c208a6dc548544131a48d Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 26 Sep 2023 16:06:26 -0700 Subject: [PATCH] Add maxRequestsPerConnection to Scylla config --- packages/backend/src/config/types.ts | 5 +++-- packages/backend/src/db/scylla.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/config/types.ts b/packages/backend/src/config/types.ts index bc2420bb69..39e1230ec7 100644 --- a/packages/backend/src/config/types.ts +++ b/packages/backend/src/config/types.ts @@ -29,8 +29,9 @@ export type Source = { password: string; }; connections?: { - local: number; - remote: number; + local?: number; + remote?: number; + maxRequestsPerConnection?: number; }; }; redis: { diff --git a/packages/backend/src/db/scylla.ts b/packages/backend/src/db/scylla.ts index b020b20fd4..d7845fb503 100644 --- a/packages/backend/src/db/scylla.ts +++ b/packages/backend/src/db/scylla.ts @@ -32,6 +32,7 @@ function newClient(): Client | null { [types.distance.local]: config.scylla.connections?.local || 2, [types.distance.remote]: config.scylla.connections?.remote || 1, }, + maxRequestsPerConnection: config.scylla.connections?.maxRequestsPerConnection || 2048, }, requestTracker, credentials: config.scylla.credentials,