Airflow tasks stuck in queued but not running: causes and fixes
Codemia Knowledge Hub ·
Airflow tasks that sit in "queued" and never move to "running" are usually blocked by one of four things: no free worker capacity, a misconfigured executor or DAG, concurrency limits set too low, or a saturated queue where low-priority tasks wait their turn. Check the scheduler and worker logs first, then the concurrency parameters below.
Not enough workers or resources
A task stays queued if nothing is available to execute it, whether the limit is worker slots, CPU, memory or network.
- Executor type: The executor decides how tasks are handed to workers.
LocalExecutorandSequentialExecutorlimit how many tasks run in parallel, so extra tasks wait in the queue. - Worker availability: If every worker is busy and no new ones can start (because of resource limits or scaling settings), tasks remain queued.
Executor or DAG misconfiguration
- DAG definition errors: Mistakes such as cyclical dependencies or wrongly wired task dependencies can stop tasks from running.
- Executor configuration: A wrong executor setting, or a scheduler and executor that do not agree, causes scheduling problems.
Scheduling and concurrency limits
Airflow schedules tasks from their dependencies and the DAG schedule, so a task may be queued simply waiting for its turn based on the DAG's start date, schedule interval and catchup settings.
- Concurrency limits: Parameters like
dag_concurrencyandmax_active_runs_per_dagkeep tasks queued until other tasks finish if they are set too low.
Queue saturation and priority
When the task queue grows large, new tasks wait longer before a worker picks them up.
- Priority weight: Tasks with lower priority weights stay queued longer when resources are tight.
Example: CeleryExecutor with busy workers
With the CeleryExecutor, a common cause is that all Celery workers are busy. Add more workers, or check that the existing workers are healthy and have not lost their connection to the message broker (RabbitMQ or Redis, for example).
This pings every Celery worker and exits with a non-zero code if none respond. On Airflow versions before the Celery provider, the app path is airflow.executors.celery_executor.app.
Airflow parameters that control queuing
| Parameter | Description | Default Value | Impact on Task Queuing |
parallelism | Total tasks that can run concurrently across all active DAGs. | 32 | Low values can cause excessive queuing. |
dag_concurrency | Number of task instances allowed to run concurrently within a specific DAG. | 16 | Low values can cause tasks in a DAG to be queued. |
max_active_runs_per_dag | Maximum number of active DAG runs, beyond which new runs will not be scheduled. | 16 | Prevents new DAG runs if max limit is reached, queuing new tasks. |
worker_concurrency | For CeleryExecutor, the number of tasks a worker can execute simultaneously. | 16 | Affects how many tasks can be taken off the queue by each worker. |
Logs and resource monitoring
- Logs: The scheduler and worker logs often show why a task is not moving to running.
- Resource usage: Monitor CPU, memory and I/O to rule out bottlenecks, and scale resources to match your workload.
Related reading
- Why do we use distributed cache in hadoop?
- Why does Spark's OneHotEncoder drop the last category by default?
- Why doesn't Hadoop file system support random I/O?
- Why is Ceph and its CRUSH algorithm less used for big data analytics?
- Why are my environment variables not detected when starting up celery?
- Why are no Amazon S3 authentication handlers ready?
- Why Kafka so fast
- Why mutual exclusion is required in MapReduce distributed system?
System design interview problems on this topic
- Design a Big Data Processing Pipeline: solution and walkthrough
- Design a Log Collection and Analysis System: solution and walkthrough
- Design an Ad Click Aggregation System: solution and walkthrough
- Design a Top-K Request Analysis System: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.