You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Subham-KRLX (via GitHub)" <gi...@apache.org> on 2026/06/18 05:44:29 UTC

[PR] Fix API server memory leak from KubernetesExecutor Manager processes [airflow]

Subham-KRLX opened a new pull request, #68697:
URL: https://github.com/apache/airflow/pull/68697

   Fixes API server memory leak when reading logs from running tasks with KubernetesExecutor.
   
   When the API server serves logs for RUNNING task instances, it was instantiating KubernetesExecutor to obtain get_task_log. Each instantiation creates a multiprocessing.Manager() process (~350-400 MB) that runs forever and is never cleaned up. This caused one leaked Manager per API worker, accumulating with worker refresh cycles and leading to OOMs.
   
   The fix loads the executor class without instantiation and uses the existing _get_task_log_static classmethod when available, preventing Manager process creation. Falls back to instantiation for executors without the static method.
   
   closes: #68693
   
   Was generative AI tooling used to co-author this PR?
   - [X] Yes - Claude Sonnet 4.5(For pr description and code research)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix API server memory leak from KubernetesExecutor Manager processes [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 closed pull request #68697: Fix API server memory leak from KubernetesExecutor Manager processes
URL: https://github.com/apache/airflow/pull/68697


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix API server memory leak from KubernetesExecutor Manager processes [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on PR #68697:
URL: https://github.com/apache/airflow/pull/68697#issuecomment-4858932201

   I've decided to merge Kaxil's equivalent PR as it provides a more comprehensive solution.
   Thanks for tackling it!


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org