Webserver is slow after upgrading to v2.9.3 #41851
Labels
area:core
area:performance
area:webserver
Webserver related Issues
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
pending-response
stale
Stale PRs per the .github/workflows/stale.yml policy file
Apache Airflow version
2.9.3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
We have updated the version from 2.6.2 to 2.9.3. After the update the main page opens very slowly. The 'failed' button causes Airflow to fail due to a timeout.
Start the discussion here
What you think should happen instead?
We have 3200 Dags now. And their number is increasing.
The slowdown is caused by line 855 in the file
/airflow/www/views.py
:But not all of it, but only that part of it that filters dags by access rights. We commented out line 799 to prevent filtering by IN. This row:
This filter condition is not optimal when querying and is very slow. The slow part is highlighted in the query
It is converted from this line:
The entire request takes between 60 and 70 seconds on our main page. But without this filtering part, the request takes just over 1 second.
My dbeaver hangs during DB query due to lack of memory.
Is it possible to optimize this query? Or split it into parts and filter by permissions it using Python.
How to reproduce
You need to have a large number of dags and dagruns.
Operating System
CentOS 7
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
Our infrastructure:
Modified bitnami images are used. Additional libraries installed.
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: