From 43f6c6b0bf6c9815ce2589e26566ea8abbdbb65f Mon Sep 17 00:00:00 2001 From: Philipp Mandler Date: Fri, 29 Dec 2023 18:35:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Increase=20sql=20connection=20po?= =?UTF-8?q?ol=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/transcribee_backend/db/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/transcribee_backend/db/__init__.py b/backend/transcribee_backend/db/__init__.py index 31cb6721..49b6f4fa 100644 --- a/backend/transcribee_backend/db/__init__.py +++ b/backend/transcribee_backend/db/__init__.py @@ -17,7 +17,11 @@ f"postgresql:///transcribee?host={DEFAULT_SOCKET_PATH}", ) -engine = create_engine(DATABASE_URL) +engine = create_engine( + DATABASE_URL, + pool_size=32, + max_overflow=1024, # we keep open a database connection for every worker +) query_histogram = Histogram( "sql_queries",