Skip to content

Commit

Permalink
fix: Increase connection pool to 20 concurrent database connections
Browse files Browse the repository at this point in the history
Due to the asynchronous nature of FastAPI and the number of requests,
it can happen that we have to handle more than the default of 5 requests
at the same time.
  • Loading branch information
MoritzWeber0 committed Oct 24, 2024
1 parent 7963611 commit 561c66c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/capellacollab/core/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
engine = sa.create_engine(
config.database.url,
connect_args={"connect_timeout": 5, "options": "-c timezone=utc"},
pool_size=20,
)
SessionLocal = orm.sessionmaker(autocommit=False, autoflush=False, bind=engine)

Expand Down

0 comments on commit 561c66c

Please sign in to comment.