Skip to content

Commit

Permalink
scale indexing sql pool based on concurrency (#3130)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuo-danswer authored and Richard Kuo [bot] committed Nov 15, 2024
1 parent 942e47d commit cfc4681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/danswer/background/celery/apps/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def on_worker_init(sender: Any, **kwargs: Any) -> None:
logger.info(f"Multiprocessing start method: {multiprocessing.get_start_method()}")

SqlEngine.set_app_name(POSTGRES_CELERY_WORKER_INDEXING_APP_NAME)
SqlEngine.init_engine(pool_size=8, max_overflow=0)
SqlEngine.init_engine(pool_size=sender.concurrency, max_overflow=sender.concurrency)

# Startup checks are not needed in multi-tenant case
if MULTI_TENANT:
Expand Down

0 comments on commit cfc4681

Please sign in to comment.