Dag is frequently going into inactive status #37983
Replies: 3 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
Dag should be written following best practices (look it up in our docs by searching for this and top-level code). Most likely your DAG takes an awfully long time to parse and generate the DAGs and you should follow the best practices to oprimize that - and for example avoid pulling you json from remote - especially if it is unstable or might take long time. Also your parsing might take long time, All that will result in errors in the dag file processor logs showing that parsing exceeded the threshold (logs that you should monitor and react to errors like that anyway - and if you don't you should make sure you have proper monitoring and alerting for all components and allo logs) and result in your DAG frequently going to inactive state. This is most likely reason. You should ideally optimise it (you will find some guidelines in best practices section of our docs) or increase the threshold (you will find it in configuratoin documentation section of our docs) if for whatever reason such optimization is not possible (though it is just masking the problem not solving it, long parsing time cause unnecessary delays on parsing and is not recommended solution). |
Beta Was this translation helpful? Give feedback.
-
Converting into a discussion - you should avoid creating an issue if you are not sure if it's your or Airflow problem, better to open discussion frst and discuss it there |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.7
What happened?
Currently we have a Dag which takes json input and generates other dags , however frequently that Dag goes into an inactive status without changing in any code or restart of any airflow components
What you think should happen instead?
Dag should not go to inactive status unless some changes are done on the Dag . Also would like to know what are the reasons a Dag could go into inactive status if no code changes are done in the Dag
How to reproduce
Mostly in an environment with 4000+ dags we are seeing this but there is no guaranteed way to generate
Operating System
Ubuntu
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions