Airflow Issues
Task Management
Queued Tasks
Troubleshooting
Workflow Automation

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. LocalExecutor and SequentialExecutor limit 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_concurrency and max_active_runs_per_dag keep 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).

bash
celery --app airflow.providers.celery.executors.celery_executor.app inspect ping

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

ParameterDescriptionDefault ValueImpact on Task Queuing
parallelismTotal tasks that can run concurrently across all active DAGs.32Low values can cause excessive queuing.
dag_concurrencyNumber of task instances allowed to run concurrently within a specific DAG.16Low values can cause tasks in a DAG to be queued.
max_active_runs_per_dagMaximum number of active DAG runs, beyond which new runs will not be scheduled.16Prevents new DAG runs if max limit is reached, queuing new tasks.
worker_concurrencyFor CeleryExecutor, the number of tasks a worker can execute simultaneously.16Affects 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.

Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design