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",