airflowdirected-acyclic-graphs

what is the difference between execution_timeout and dagrun_timeout in airflow?


I am new to airflow and wanted to know the difference between execution_timeout and dagrun_timeout in Airflow. Actually, in my codebase, I am currently using execution_timeout but some of the dags are not respecting timeout.


Solution

  • From the documentation:

    execution_timeout (datetime.timedelta) – max time allowed for the execution of this task instance, if it goes beyond it will raise and fail.

    dagrun_timeout (datetime.timedelta) – specify how long a DagRun should be up before timing out / failing, so that new DagRuns can be created

    The execution_timeout refers to the execution of the TaskInstance, while the dagrun_timeout is about the entire DAG which can consist of many tasks.

    To understand why your tasks are not respecting the timeout, you will need to provide more information, and ideally a minimal example.