Airflow list dag times out exactly after 30 seconds

℡╲_俬逩灬. 提交于 2019-12-11 15:15:50

问题


I have a dynamic airflow dag(backfill_dag) that basically reads admin variable(Json) and builds it self. Backfill_dag is used for backfilling/history loading, so for example if I wants to history load dag x,y, n z in some order(x n y run in parallel, z depends on x) then I will mention this in a particular json format and put it in admin variable of backfill_dag.

Backfill_dag now:

parses the Json, renders the tasks of the dags x,y, and z, and builds itself dynamically with x and y in parallel and z depends on x

Issue:

It works good as long as Backfill_dag can list_dags in 30 seconds. Since Backfill_dag is bit complex here, it takes more than 30 seconds to list(airflow list_dags -sd Backfill_dag.py), hence it times out and the dag breaks.

Tried:

I tried to set a parameter, dagbag_import_timeout = 100, in airflow.cfg file of the scheduler, but that did not help.


回答1:


I fixed my code.

Fix: I had some aws s3 cp command in my dag that were running durring compilation hence my list_dags command was taking more than 30 seconds, i removed them(or had then in a BashOperator task), now my code compiles(list_dags) in couple of seconds.



来源:https://stackoverflow.com/questions/51603882/airflow-list-dag-times-out-exactly-after-30-seconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!