-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAG loading very slow in Graph view when using Dynamic Tasks #27483
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Marking this as webserver instead of UI since #23813 seems to indicate this can be resolved by only backend changes. Pull requests are welcomed. |
I can take a look at #23813 next week and see if I can solve this issue in a similar way. |
Hi there, I am facing the same issue and I just have about 100 mapped tasks. |
Hey! Sorry, I deprioritised this issue because we changed the logic we were using on my organisation to avoid using many mapped tasks (which turned out to be a better design choice IMO tbh), but I am looking into it again. I already confirmed this is still an issue in the latest version of Airflow, I will make a PR for it this week on my personal Github account. |
Hi Jose. what do you mean by "we changed the logic to avoid using many mapped tasks"? Thank you |
@arley-wilches Ups! Sorry, Didn't explain myself well there, I meant in my organisation we changed the logic we were using in our DAGs, which was a decision that had nothing to do with this issue. At the moment you can use as many mapped tasks as you want in Airflow (Until a certain configurable threshold), just it will take a lot of time (or even fail) to load the "Graph" View in the Web UI. |
@jose-workpath I get it. but anyways will the solution come at some point? Is there anything I can help with? |
Apache Airflow version
2.4.2
What happened
The web UI is very slow when loading the Graph view on DAGs that have a large number of expansions in the mapped tasks.
The problem is very similar to the one described in #23786 (resolved), but for the Graph view instead of the grid view.
It takes around 2-3 minutes to load DAGs that have ~1k expansions, with the default Airflow settings the web server worker will timeout. One can configure web_server_worker_timeout to increase the timeout wait time.
What you think should happen instead
The Web UI takes a reasonable amount of time to load the Graph view after the dag run is finished.
How to reproduce
Same way as in #23786, you can create a mapped task that spans a large number of expansions then when you run it, the Graph view will take a very long amount of time to load and eventually time out.
You can use this code to generate multiple dags with
2^x
expansions. After running the DAGs you should notice how slow it is when attempting to open the Graph view of the DAGs with the largest number of expansions.Operating System
MacOS Version 12.6 (Apple M1)
Versions of Apache Airflow Providers
Deployment
Docker-Compose
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: