phanikumv commented on code in PR #69015:
URL: https://github.com/apache/airflow/pull/69015#discussion_r3481171692


##########
providers/celery/src/airflow/providers/celery/cli/celery_command.py:
##########
@@ -193,6 +197,20 @@ def filter(self, record):
 @_providers_configuration_loaded
 def worker(args):
     """Start Airflow Celery worker."""
+    # Apply the configured multiprocessing start method before the worker 
creates any stdlib
+    # multiprocessing objects -- the serve_logs and stale-bundle-cleanup 
helper Processes started
+    # below, and the optional SecretCache Manager. CPython 3.14 switched the 
Unix default from fork
+    # to forkserver (gh-84559); under forkserver those helpers re-import 
Airflow and spin up extra
+    # forkserver/resource_tracker processes, inflating the worker's resident 
memory. Setting
+    # [celery] mp_start_method = fork (or [core] mp_start_method) restores the 
pre-3.14 behaviour.
+    # This governs stdlib multiprocessing only; Celery's prefork pool is 
driven by billiard, which
+    # keeps its own fork default and is unaffected. Guarded because 
set_component_mp_start_method
+    # only exists on Airflow 3.3+.
+    if AIRFLOW_V_3_3_PLUS:
+        from airflow.utils.process_utils import set_component_mp_start_method
+

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to