Sensor deadlock occurs when polling sensors consume all available task capacity, preventing other tasks from running. In a supermarket couponing workflow, repeatedly polling sensors accumulate until the DAG reaches its task limit; if the global limit is reached, the entire Airflow system can stall. section 7.1.2
A capacity snowball
With 16 concurrent task slots, three supermarkets polling each day consume 3, 6, 9, 12, and 15 slots over successive days. On day six, all 16 slots are occupied, so new tasks cannot run. section 7.1.2
Prevent or limit sensor deadlock by choosing how waiting tasks use capacity:
- Use sensor mode="reschedule" so the sensor releases its slot after each poke and occupies capacity only while doing work. section 7.1.2
- Use deferrable operators so idle work moves to the triggerer and worker slots remain available for other tasks. section 7.1.2
- Control DAG or global concurrency limits, while recognizing that raising capacity alone does not remove inefficient polling. section 7.1.2
