Browse Source

increase pool size of Postgresql

highing666 3 năm trước cách đây
mục cha
commit
e16dbe752e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/db/session.py

+ 1 - 1
app/db/session.py

@@ -4,7 +4,7 @@ from sqlalchemy.orm import sessionmaker
 
 from app.core.config import settings
 
-engine = create_engine(settings.SQLALCHEMY_DATABASE_URL, pool_pre_ping=True, pool_size=90)
+engine = create_engine(settings.SQLALCHEMY_DATABASE_URL, pool_pre_ping=True, pool_size=1000, max_overflow=2000)
 SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
 
 Base = declarative_base()