Compare commits

...

1 Commits

Author SHA1 Message Date
giles
5518c95237 Bound connection pool to prevent max_connections exhaustion
pool_size=5, max_overflow=10 per app (6 apps = 90 max connections).
Previously pool_size=0 meant unlimited connections, causing
asyncpg.TooManyConnectionsError under concurrent load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:08:00 +00:00

View File

@@ -15,7 +15,8 @@ _engine = create_async_engine(
future=True,
echo=False,
pool_pre_ping=True,
pool_size=0, # 0 = unlimited (NullPool equivalent for asyncpg)
pool_size=5,
max_overflow=10,
)
_Session = async_sessionmaker(