---
title: "Airflow sensors with no timeout | Metacenta"
description: "An Airflow sensor in poke mode can hold a worker slot for seven days. How we find sensors with no timeout, and how to let them wait without blocking."
url: "https://metacenta.com/rules/dag-sensor-no-timeout"
updated: "2026-10-14"
tokens: 526
---

Orchestration & reliability · rule dag-sensor-no-timeout

# Airflow sensors with no timeout

A Metacenta review checks this under the rule **A sensor gives up in bounded time**. Everything below applies whether or not you ever commission one.

## What this rule checks

This rule flags DAG files with a sensor that sets no `timeout`, no `mode="reschedule"` and no `deferrable=True`. Any one of the three passes. A file that builds no sensor is not judged.

## Why it matters

Airflow's default sensor timeout is seven days, and a sensor in the default poke mode holds a worker slot for all of it. A missing upstream file can then stop other jobs from starting.

## How to fix it

**Give every sensor a timeout.** Set `timeout` to how late the data can reasonably be. Use `mode="reschedule"` or a deferrable sensor, so the wait does not hold a slot.

Before:

```python
FileSensor(
    task_id="wait_for_orders",
    filepath="orders.csv",
)
```

After:

```python
FileSensor(
    task_id="wait_for_orders",
    filepath="orders.csv",
    timeout=6 * 60 * 60,
    mode="reschedule",
)
```

## When it is fine to leave

A short poke-mode sensor on a cluster with spare slots does little harm, and poke mode reacts faster. Set a `timeout` even then, so a file that never lands fails the run.

## What we need to check it

The DAG files you name to us one at a time. We count sensors by their constructor, so the finding is medium confidence.

[Ask about a review](https://metacenta.com/enquire?src=rule-dag-sensor-no-timeout&via=md)

## Related pages

- [Airflow DAG owner: how to set it and what it does](https://metacenta.com/rules/dag-unowned)
- [Airflow DAGs with no retries](https://metacenta.com/rules/dag-no-retries)
- [Airflow DAGs with no failure alert](https://metacenta.com/rules/dag-no-failure-alert)
- [Airflow catchup: what it does and how to control it](https://metacenta.com/rules/dag-catchup-unbounded)
- [A sample review, as a client reads it](https://metacenta.com/sample)
- [All published rules](https://metacenta.com/rules)
- [How a review is assessed](https://metacenta.com/standard)
