Ver código fonte

increase pool size of Postgresql

highing666 3 anos atrás
pai
commit
e16dbe752e
1 arquivos alterados com 1 adições e 1 exclusões
  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()