Add Celery worker multiprocessing start method config for Python 3.14#69015
Merged
jason810496 merged 1 commit intoJun 26, 2026
Merged
Conversation
1 task
Python 3.14 changed the Unix multiprocessing default from fork to forkserver (gh-84559). The Celery worker starts its log server and the stale-bundle-cleanup loop (and the optional SecretCache manager) as stdlib multiprocessing.Process children. Under forkserver each re-imports Airflow and spins up extra forkserver/resource-tracker processes, so a 3.13 to 3.14 upgrade inflates the worker's resident memory even though nothing about the workload changed. A new [celery] mp_start_method (falling back to [core] mp_start_method) lets a deployment pin fork to restore the pre-3.14 behaviour. It governs only the worker's stdlib multiprocessing helpers; Celery's prefork pool is driven by billiard, which keeps its own fork default and is unaffected either way.
971a123 to
2f47e75
Compare
phanikumv
reviewed
Jun 26, 2026
vatsrahul1001
approved these changes
Jun 26, 2026
Contributor
|
Nice! Looks good to me |
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the 2026-06-16 wave after binding -1 votes; their blockers are now resolved, so re-cut the same versions with the fixes folded in. fab and keycloak need corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client integration was reverted from core (apache#68856) and a Keycloak access-denied bug fix (apache#68951). celery (3.21.0) adds a Python 3.14 worker start-method config (apache#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes client 36.x (apache#69032).
1 task
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the 2026-06-16 wave after binding -1 votes; their blockers are now resolved, so re-cut the same versions with the fixes folded in. fab and keycloak need corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client integration was reverted from core (apache#68856) and a Keycloak access-denied bug fix (apache#68951). celery (3.21.0) adds a Python 3.14 worker start-method config (apache#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes client 36.x (apache#69032).
shahar1
added a commit
that referenced
this pull request
Jun 26, 2026
cncf.kubernetes (10.18.1) and apache.spark (6.2.0) were excluded from the 2026-06-16 wave after binding -1 votes; their blockers are now resolved, so re-cut the same versions with the fixes folded in. fab and keycloak need corrective patch releases (3.7.1, 0.8.1) after the airflowctl CLI client integration was reverted from core (#68856) and a Keycloak access-denied bug fix (#68951). celery (3.21.0) adds a Python 3.14 worker start-method config (#69015), and google (22.2.1) ships the GKE 401 fix for kubernetes client 36.x (#69032).
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Airflow 3.2.2 in Python 3.13.Why
Python 3.14 changed the Unix
multiprocessingdefault fromforktoforkserver, which makes the Celery worker's stdlib multiprocessing helpers re-import Airflow and spawn extra forkserver/resource-tracker processes, inflating resident memory.What
[celery] mp_start_methodand[celery] mp_forkserver_preloadconfig options (fall back to[core]equivalents).airflow celery workernow callsset_component_mp_start_method("celery")before spawning any stdlib helper (serve_logs, stale-bundle cleanup, SecretCache Manager), guarded behindAIRFLOW_V_3_3_PLUS.forkdefault and is unaffected.Was generative AI tooling used to co-author this PR?