Skip to content

Commit

Permalink
🐛 Increase sql connection pool size
Browse files Browse the repository at this point in the history
  • Loading branch information
phlmn committed Dec 29, 2023
1 parent a4e451a commit 3552774
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/transcribee_backend/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
f"postgresql:///transcribee?host={DEFAULT_SOCKET_PATH}",
)

engine = create_engine(DATABASE_URL)
engine = create_engine(
DATABASE_URL,
pool_size=32,
max_overflow=1024, # we keep open a database connection for every worker
)

query_histogram = Histogram(
"sql_queries",
Expand Down

0 comments on commit 3552774

Please sign in to comment.