diff --git a/backend/danswer/background/celery/apps/indexing.py b/backend/danswer/background/celery/apps/indexing.py index 01ec79e5c7b..533f9b96818 100644 --- a/backend/danswer/background/celery/apps/indexing.py +++ b/backend/danswer/background/celery/apps/indexing.py @@ -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: