Skip to content

Commit

Permalink
perf(engine): More async engine pool
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Jan 21, 2025
1 parent 9a6bd34 commit 8952126
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tracecat/db/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ def _create_db_engine() -> Engine:
def _create_async_db_engine() -> AsyncEngine:
# Postgres as default
engine_kwargs = {
"pool_size": 50,
"max_overflow": 10,
"future": True,
"pool_recycle": 3600,
"pool_size": 100,
"max_overflow": 100,
"pool_recycle": 1000, # Recycle connections after 30 mins
"pool_use_lifo": True, # Better for burst workloads
}

uri = _get_db_uri(driver="asyncpg")
Expand Down

0 comments on commit 8952126

Please sign in to comment.