airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-584) Airflow Pool does not limit running tasks
Date Thu, 20 Oct 2016 20:13:59 GMT
David created AIRFLOW-584:

             Summary: Airflow Pool does not limit running tasks
                 Key: AIRFLOW-584
             Project: Apache Airflow
          Issue Type: Bug
          Components: pools
    Affects Versions: Airflow
         Environment: Ubuntu 14.04
            Reporter: David

Airflow pools are not limiting the number of running task instances for the following dag

Steps to recreate:
Create a pool of size 5 through the UI.

The following dag has 52 tasks with increasing priority corresponding to the task number.
There should only ever be 5 tasks running at a time however I observed 29 'used slots' in
a pool with 5 slots

dag_name = 'pools_bug'

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'start_date': datetime(2016, 10, 20),
    'email_on_failure': False,
    'retries': 1

dag = DAG(dag_name, default_args=default_args, schedule_interval="0 8 * * *")
start = DummyOperator(task_id='start', dag=dag)
end = DummyOperator(task_id='end', dag=dag)

for i in range(50):
    sleep_command = 'sleep 10'
    task_name = 'task-{}'.format(i)
    op = BashOperator(


Relevant configurations from airflow.cfg:
# The amount of parallelism as a setting to the executor. This defines
# the max number of task instances that should run simultaneously
# on this airflow installation
parallelism = 64

# The number of task instances allowed to run concurrently by the scheduler
dag_concurrency = 64

# The maximum number of active DAG runs per DAG
max_active_runs_per_dag = 1

This message was sent by Atlassian JIRA

View raw message