From 328c4d503abd1fc3a092341cf7333925f579202f Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Sun, 25 Feb 2024 22:46:17 +0000 Subject: [PATCH] fix: set sqlalchemy connection max_overflow unlimited, until task queue --- src/backend/app/db/database.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/app/db/database.py b/src/backend/app/db/database.py index 714c381c64..f5cc4c1ad2 100644 --- a/src/backend/app/db/database.py +++ b/src/backend/app/db/database.py @@ -23,7 +23,11 @@ from app.config import settings -engine = create_engine(settings.FMTM_DB_URL.unicode_string()) +engine = create_engine( + settings.FMTM_DB_URL.unicode_string(), + pool_size=20, + max_overflow=-1, +) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base()