Replies: 2 comments 3 replies
-
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.
-
You are not following best practices - you should avoid running long running operations during DAG parsing (i.e. top-level code execution) - follow the documetnation to fix it - https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html#top-level-python-code - simply sometimes parsing of your DAG file takes too long. You can modify various parameters in airflow configuration for example https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#dag-file-processor-timeout - but this is a band-aid and you should optimize your DAG parsing time - to not reach out to DB every time DAG is parsed. Vaarious techniques that you can use are described in https://airflow.apache.org/docs/apache-airflow/stable/howto/dynamic-dag-generation.html Converting to a discussion, as this is just not following good practices. |
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.6.2
What happened?
Hi Team,
We have upgraded our airflow version from 1.10.10 to 2.6.2 recently.
We have one dag which reads from DB and launches multiple dags , its stores all these dynamic values in airflow variable.
Our DB backend is RDS mysql 8 version.
We are launching 50+ dags dynamically from this one dag and also we have 2 separate dags which have dedicated dag files.
We are intermittently get issues some time where on UI we only see 2 dags which are launched by dag files.
All other dags which are launched by dynamic dag are not visible, within few seconds they appear again while in background they are running fine.
We use Airflow APIs to trigger dags from some external code , but in code also we are getting intermittent failures with response 404. This happens for some seconds.
We tried to check the scheduler and worker logs but could not find any relevant info. We are trying to reproduce this scenarios but unable to do so because we are not sure what condition triggers this intermittent failures.
Please help us with any workaround or quick fix to handle this issue if this is some known issue reported for this version
What you think should happen instead?
We dont have particular logs but on UI dags disappears for some seconds and appears again.
How to reproduce
We are trying to reproduce this scenarios but unable to do so because we are not sure what condition triggers this intermittent failures.
Operating System
AWS ec2
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
We are using airflow dockerfile and deploy it via AWS ECS service.
Anything else?
This occurs intermittently now. This is observed on airflow 2.6.2 version,
We used to have same dynamic dag generation logic on 1.10.10 version but did not face any such issue previously
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions