Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCT-2296: Tweak defaults of PG_POOL when max_connections increased #616

Merged
merged 10 commits into from
Jan 15, 2025
6 changes: 3 additions & 3 deletions backend/v2/core/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def get_w3(

class DatabaseSettings(OctantSettings):
"""
Values below are the defaults for the database with max_connetions = 100 and backend pods = 3.
Values below are the defaults for the pod which can serve up to 100 connections.
"""

db_uri: str = Field(..., alias="db_uri")

pg_pool_size: int = Field(20, alias="sqlalchemy_connection_pool_size")
pg_max_overflow: int = Field(13, alias="sqlalchemy_connection_pool_max_overflow")
pg_pool_size: int = Field(67, alias="sqlalchemy_connection_pool_size")
pg_max_overflow: int = Field(33, alias="sqlalchemy_connection_pool_max_overflow")
pg_pool_timeout: int = 60
pg_pool_recycle: int = 30 * 60 # 30 minutes
pg_pool_pre_ping: bool = True
Expand Down
Loading