From ac182c74b3862ba75097f6f346b7d39357b5878d Mon Sep 17 00:00:00 2001 From: "Richard Kuo (Danswer)" Date: Fri, 10 Jan 2025 12:11:33 -0800 Subject: [PATCH] log all start methods --- backend/onyx/background/celery/apps/indexing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/onyx/background/celery/apps/indexing.py b/backend/onyx/background/celery/apps/indexing.py index 46282772f..818277ab4 100644 --- a/backend/onyx/background/celery/apps/indexing.py +++ b/backend/onyx/background/celery/apps/indexing.py @@ -57,6 +57,10 @@ def on_celeryd_init(sender: Any = None, conf: Any = None, **kwargs: Any) -> None @worker_init.connect def on_worker_init(sender: Any, **kwargs: Any) -> None: logger.info("worker_init signal received.") + + all_start_methods: list[str] = multiprocessing.get_all_start_methods() + logger.info(f"Multiprocessing all start methods: {all_start_methods}") + multiprocessing.set_start_method("spawn") # fork is unsafe, set to spawn logger.info(f"Multiprocessing start method: {multiprocessing.get_start_method()}")