DAGS disappear from UI [2.5.1] #30364
Replies: 6 comments 8 replies
-
then it should be a discussion. converted it. |
Beta Was this translation helpful? Give feedback.
-
I think you should describe the ways you are synchronizing your DAGs or to look what you are doing in top-level of your DAGs. Likely you have periods where DAGs are not visible for scheduler (DAG folder appears to be empty or files cannot be read or are partially visible/broken) or you have intermittent problems that parsing your DAGs are flaky and sometimes works, sometimes not. BTW. It is a bad practice to have your DAGs reach out to external sources like DB/Network in top-level code https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html#top-level-python-code and any flakiness there might cause similar problems. Also My comments from similar discussion in Slack https://apache-airflow.slack.com/archives/CSS36QQS1/p1680059510273789
|
Beta Was this translation helpful? Give feedback.
-
I work with Taylor. I'm completely open to this being our fault somehow, but what made us suspect a bug is that this started happening with the 2.5.1 upgrade and we have made no other major changes. So far the database looks fine but we'll keep looking and we don't empty the DAG folder or delete DAG files through any automated processes. Also, we are getting an absolutely ridiculous amount of "already registered for DAG" warnings (due to Airflow incorrectly assuming that the method name is the task name when performing this check) and we have over 1,200 DAGs. These two things seem to make Could there be a bug in Airflow 2.5.x? With at least one other person reporting something similar with 2.5.x, it seems suspicious. |
Beta Was this translation helpful? Give feedback.
-
Hi, we have a similar issue with dynamic DAGs on airflow 2.3.3. I can see in the logs crearly that the DAG is being created and the mode is available in globals(), however for some reason some dags never make it to Airflow UI. Interestingly the dynamic DAGs are being generated by on file and some do make it and some dont. Amazingly it does work fine in development, locally and I have printed the airflow dags list does NOT show the dags in question |
Beta Was this translation helpful? Give feedback.
-
@taylorfinnell I hope you have found a fix to this over a year later, but to anyone visiting this today: TLDR; More RAM & threads, and check your docker image architecture I was running into the exact same problem on my M1 Macbook, where I would see all the DAGs in the UI, and then within a minute they would start to disappear and potentially never return. In the Scheduler logs, I could see that it was removing "serialized" tables from the database for no apparent reason (no files were being removed), and killing file processors too. Today I realised that I was running the Now that I am using the I can still make the DAGs "disappear" by running a bunch at the same time, sapping all the resources available to the Scheduler. So honestly it seems like you just need enough RAM and threads to keep Airflow from imploding on itself. |
Beta Was this translation helpful? Give feedback.
-
To make a long story short - for large amounts of generated DAGs we had to make dag_file_processor_timeout and dagbag_import_timeout much larger than the defaults as it just failed silently after the timeout. |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
Other Airflow 2 version (please specify below)
2.5.1
What happened
Hello,
Since upgrading to 2.5.1, we have noticed the sporadic disappearance of DAGs from the web UI. Sadly, we have not been able to reproduce it reliably. As such, this bug report is unfortunately lacking in details and is meant to hopefully get some ideas on how to approach debugging this.
One thing we have determined brings the DAGs back is to run
airflow dags reserialize
. It's worth noting that the DAG files are still on disk when missing in the UI. They also fail to show up inairflow dags list
. Additionally, we believe, but are not certain, that the DAGs are still getting scheduled and executing work despite being absent in the web UI.What you think should happen instead
DAGs should not disappear.
How to reproduce
We are looking for help or ideas on how to repro this.I'm looking for help or ideas on how to fix
Operating System
Centos 7
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
K8s
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions