You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I migrated airflow version 2.2.0 to 2.9.0 and python 3.8 to 3.12.
and i experienced too much load time in airflow web dashboard.
in airflow 2.2.0, airflow dashboard loaded almost instantly. but in 2.9.0, it tooks almost 10 seconds.
Airflow 2.2.0
Airflow 2.9.0
What you think should happen instead?
I think there is no reason to make slow page loading time because of not using static file caching.
And I figured out the root cause. the problem is airflow webserver's caching is disabled because of bumping up Flask version 1.x to 2.x.
In Flask, there is Configuration Option for static file's Expire time for cache-control.
it is SEND_FILE_MAX_AGE_DEFAULT.
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.9.0/docker-compose.yaml'
AIRFLOW_UID=$(id -u) docker compose up
access airflow webserver with webbrowser. and refresh the page.
Operating System
Ubuntu 22.04.3 LTS
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
I am newbie in Airflow.
I read airflow installation guide and configruation reference. but I'm not sure if there is a better way to do this without changing the code.
Is there any way to configure static file caching? please just talk to me.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.3.x ~ 2.9.x
What happened?
Recently, I migrated airflow version 2.2.0 to 2.9.0 and python 3.8 to 3.12.
and i experienced too much load time in airflow web dashboard.
in airflow 2.2.0, airflow dashboard loaded almost instantly. but in 2.9.0, it tooks almost 10 seconds.
Airflow 2.2.0
Airflow 2.9.0
What you think should happen instead?
I think there is no reason to make slow page loading time because of not using static file caching.
And I figured out the root cause. the problem is airflow webserver's caching is disabled because of bumping up Flask version 1.x to 2.x.
In Flask, there is Configuration Option for static file's Expire time for cache-control.
it is
SEND_FILE_MAX_AGE_DEFAULT
.In Flask 1.1.x, the default value of
SEND_FILE_MAX_AGE_DEFAULT
is 12 hours.https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.send_file_max_age_default
After Flask 2.0.x, the default value of
SEND_FILE_MAX_AGE_DEFAULT
is changed to None.https://flask.palletsprojects.com/en/2.0.x/api/#flask.Flask.send_file_max_age_default
after Airflow 2.3.0, Flask version is upgraded to 2.0.x.
When i added flask configuration in app.py
static file caching works well.
example is here. https://github.com/VertexToEdge/airflow-docker-compose
How to reproduce
I followed setup instruction in https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html
Operating System
Ubuntu 22.04.3 LTS
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
I am newbie in Airflow.
I read airflow installation guide and configruation reference. but I'm not sure if there is a better way to do this without changing the code.
Is there any way to configure static file caching? please just talk to me.
thanks for reading. have a good day.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: