You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "arkadiuszbach (via GitHub)" <gi...@apache.org> on 2025/12/01 14:16:52 UTC

Re: [I] Airflow triggerer memory is increasing continously [airflow]

arkadiuszbach commented on issue #42195:
URL: https://github.com/apache/airflow/issues/42195#issuecomment-3596781641

   I checked the following Docker images:
   - apache/airflow.1.10.15
   - apache/airflow:2.2.0
   - apache/airflow:2.10.2-python3.12
   - apache/airflow:3.1.3-python3.12
   - apache/airflow:3.0.2-python3.12
   
   In version 1.10.15, I noticed that some .pyc files were present under /usr/local/lib/python3.xx, but the other images didn’t have any .pyc files at all.
   
   Initially, I thought the Airflow 3 images contained some .pyc files, but it turns out they don’t. It’s possible that .pyc files were generated only when I was running the container as root, since once the scheduler starts, it may compile the modules at runtime.
   
   While Python normally generates .pyc files during make install, it looks like these files are immediately deleted afterward in the Airflow images:
   https://github.com/apache/airflow/blob/8545d3c578af5e254e230e38f8a5035fac045342/Dockerfile#L427
   
   I also checked some of the official Python images that Airflow was previously based on, and they include the same logic to delete .pyc files after the make step. This behavior goes back at least eight years — it may have been there since the very beginning:
   https://github.com/docker-library/python/blob/7891fcc63609dfd43ae2e8de13a40e838b5e7608/3.6/stretch/slim/Dockerfile#L114


-- 
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