Airflow Task Stuck in Queued
Causes and Fixes (Apache Airflow)
An Apache Airflow task stuck in queued is waiting for a worker: the executor has it and no worker can take it, usually because no worker listens to its queue or every worker slot is busy. A task stuck in scheduled, or not starting at all, is held by a pool, DAG or global limit that the scheduler enforces. Since Airflow 2.6.0 a task left in queued is retried or failed after 600 seconds by default.
Why is an Airflow task stuck in queued?
In Apache Airflow, queued means the task "has been assigned to an Executor and is awaiting a worker", per the task states in the Airflow documentation. A task sits there when the executor has it and no worker takes it. Either no worker process is running, the running workers don't listen to the task's queue, or every worker slot is busy. The scheduler has finished its part by then, so the executor and the workers are where to look.
A task stuck in scheduled is a different problem with a different owner. Scheduled means the scheduler found the dependencies met, and it enqueues tasks only while respecting pool limits and other concurrency limits. The state tells you which side to inspect before you read a single log.
Know Airflow task stuck in queued the way the interviewer who asks it knows it.
Scheduled vs queued: which side holds the task
The documented path of a task instance is none, scheduled, queued, running, success. Each hand off has its own gatekeeper. Between scheduled and queued the scheduler checks the pool's free slots, the DAG's concurrency caps and the global limit. Between queued and running the executor needs a worker that listens to the right queue and has a free slot.
Only the second wait has a clock. The scheduler.task_queued_timeout option, added in Airflow 2.6.0, is the "amount of time a task can be in the queued state before being retried or set to failed", and it defaults to 600 seconds (10 minutes). A task held in scheduled has no such timeout, so it can wait indefinitely behind a full pool.


How to find what is holding the task, in order
- 01
Read the state
In the Task Instances view, scheduled points at limits and queued points at workers and the executor.
- 02
If scheduled, check the pool
Open Admin, Pools and compare each pool's slots with the tasks that want them.
- 03
Then check the concurrency caps
Compare running task instances with the DAG's max_active_tasks and the global parallelism.
- 04
If queued, check that workers are alive
Confirm a worker process is running and connected to the broker or cluster.
- 05
Match the queue name
A task's queue must be one that some worker listens to.
- 06
Check worker slots
A worker takes up to worker_concurrency tasks, and more queue behind them.
Tasks stuck in scheduled: pools, DAG caps and parallelism
A pool is the first suspect. Tasks without a pool use default_pool, which starts with 128 slots, and each task takes 1 slot by default. A pool you created is usually much smaller. Say warehouse_loads has 4 slots and a DAG fans out 30 tasks into it: 4 run and 26 wait. The pool is working as configured, but the board looks stuck. The pool_slots parameter makes it worse, since in the documentation's example a task with pool_slots=2 in a 2 slot pool blocks 2 other 1 slot tasks until it finishes.
Next come the caps. core.max_active_tasks_per_dag defaults to 16, so a run that fans out 40 tasks has 16 in flight and 24 waiting, unless the DAG sets its own max_active_tasks. A per task max_active_tis_per_dag limits that one task across runs. core.parallelism defaults to 32 and caps what runs at once, so a busy deployment can hold tasks in scheduled even when each DAG is under its own cap.
Priority decides who goes first, not whether anyone does. The scheduler documentation says priority "will only come into effect when there are more scheduled tasks waiting than the queue slots". When 1 DAG with a large fan out starves another, give the fan out its own pool instead of raising priorities. The scheduler applies all of these limits in each loop, evaluating 16 task instances per query by default.
The limits that hold a task, with their defaults
Tasks stuck in queued: workers, queues and slots
With the Celery executor, the first check is that a worker is running at all: airflow celery worker starts one, and it must reach the broker. The second is the queue name. Any task can carry a queue, and a worker started with -q spark,quark picks up only tasks wired to those queues. A task sent to a queue no worker listens to is queued forever, which is the most common mistake after someone adds a queue= argument to an operator.
Capacity comes third. A Celery worker runs up to worker_concurrency tasks at once, and the provider documentation advises making sure the worker has enough resources for that many. When every worker is full, new tasks wait in queued while running ones finish. Also keep the broker's visibility_timeout above the ETA of your longest task, which the same documentation asks for, and do not clear Redis broker keys while workers run, since that can lose pending work.
With the Kubernetes executor, the equivalent question is whether the cluster can start the task's pod. The provider documentation offers airflow kubernetes generate-dag-yaml, which dumps the pods the executor would launch so you can inspect them, and its pod watcher marks a task failed when a worker pod crashes. When the scheduler process itself dies, another scheduler adopts the running or queued tasks it launched.
What the queued timeout does and the no logs failure
When a task passes scheduler.task_queued_timeout, the scheduler retries it or sets it to failed. The check is periodic, so the worst case is the timeout plus 1 interval: 600 + 120 = 720 seconds, or 12 minutes, with the defaults.
The Airflow FAQ names this as 1 of 2 reasons a task fails with no logs in the UI: the task never reached a worker, so nothing wrote a log. Setting retries on each task reduces the chance that either problem breaks a workflow. Raising the timeout hides a lack of capacity and lowering it fails tasks that only needed a slot to free up, so treat it as a safety net and fix the cause.
Airflow task not starting: when no task instance runs at all
If the task never reaches scheduled, the problem is upstream of the executor. The FAQ's checklist covers it: the scheduler must parse the file and find the DAG object (airflow dags list shows what it found), a time based DAG waits until the first schedule interval after start_date has passed, and the scheduler "never goes back in time" to create runs. Upstream tasks must be in success, and with depends_on_past the previous instance must have succeeded or been skipped.
Run limits cause a quieter version. max_active_runs defaults to 16 through core.max_active_runs_per_dag, and runs beyond it wait, so a slow run can hold the next ones back. Clearing task instances sets the DAG run back to running, which can be what starts a task you thought was dead. The Airflow schedule interval guide explains why a first run waits a whole interval, and the Airflow DAG guide covers how runs and task instances relate.
How this comes up in a data engineering interview
Interviewers ask this as an operations question: a pipeline stopped moving, and what do you check. A strong answer separates the 2 states, names the gate behind each and says what you would change so it does not recur, such as a dedicated pool for a wide fan out or alerting on tasks queued longer than expected. The Airflow interview questions cover this ground, and the data pipeline interview questions and data pipeline practice problems cover designing pipelines whose concurrency limits you can defend. The system design round guide shows where it fits in a loop.
Airflow stuck in queued FAQ
Why is my Airflow task stuck in queued?+
What is the difference between scheduled and queued in Airflow?+
How long can an Airflow task stay in queued?+
Why does my task fail with no logs?+
Why are my Airflow tasks stuck in scheduled?+
Why is my Airflow task not starting at all?+
The candidate who gets the offer
- 01
Reading a solution is not the same as writing one
Every engineer who has frozen on a query they had read a dozen times knows the gap. The only preparation that closes it is producing the answer yourself, under time, before the interview does it for you
- 02
76% of hiring managers reject on the coding task, not the resume
From HackerRank's 2024 Developer Skills Report. Candidates who look strong on paper still fail the live screen if they haven't done timed, executable practice
- 03
System design comes down to the calls you defend out loud
Ingestion, batch vs streaming, the bronze/silver/gold layers, idempotency, backfill and replay. Sketching the pipeline and naming the failure modes is the signal, not the boxes
Related guides
Airflow interview questions
Scheduler, executor and concurrency questions asked in interviews
Data pipeline interview questions
Pipeline design and operations questions
Data pipeline practice problems
Pipeline design problems to practice
Airflow schedule interval
Why a first run waits and what the data interval means
Airflow DAG
How DAG runs and task instances relate
This week's community challenge
Dirty, production-shaped data, scored blind each week.