Area: Deployment Issues
Sub-Area: Airflow Plugin Integration
Applies to: OSS + Cloud
Issue
After you install or upgrade the DataHub Airflow plugin, your Airflow scheduler is slow or stalls, and the scheduler log shows this warning:
-
Thread for on_dag_run_running is still running after 10.0 seconds. Continuing without waiting for it to finish.(logged bydatahub_airflow_plugin.airflow3.datahub_listener)
You Might Be Asking
- Why did my Airflow scheduler stall after I added the DataHub plugin?
- Is the "Thread for ... is still running" message a crash?
- Which DataHub plugin version should I use with my Airflow version?
- How do I turn the DataHub plugin off?
Cause
The plugin listener runs its work in a background thread by default (DATAHUB_AIRFLOW_PLUGIN_RUN_IN_THREAD, default true). DATAHUB_AIRFLOW_PLUGIN_RUN_IN_THREAD_TIMEOUT (default 10 seconds) sets how long the listener waits for that thread before it moves on. When the wait runs out, the listener logs the warning above. The warning is not a crash. It means the listener stopped waiting.
In large deployments, this wait on each hook can stall the scheduler. A higher timeout makes each hook block longer.
The warning comes from the Airflow 3 listener, so you see it on Airflow 3 with the current plugin.
Solution
-
Stop the scheduler from waiting. Set the timeout to 0 so the plugin runs fully in background threads:
export DATAHUB_AIRFLOW_PLUGIN_RUN_IN_THREAD_TIMEOUT=0Do not raise the timeout. A higher value makes each hook block longer. With 0, some metadata can be missed if the scheduler shuts down soon after it processes a task. See Scheduler stalling.
-
Or run the listener synchronously. Set
DATAHUB_AIRFLOW_PLUGIN_RUN_IN_THREAD=false. Work then runs in the listener itself instead of a background thread. -
Use the plugin version that matches your Airflow version. Airflow 3.0+ uses the current release. Airflow 2.x is no longer officially supported. Pin the plugin on Airflow 2.x:
Airflow version Plugin pin 2.3 to 2.4.3 <=1.0.02.5 and 2.6 <=1.1.0.42.7 to 2.10 <=1.6.0For example, on Airflow 2.7 to 2.10:
pip install 'acryl-datahub-airflow-plugin<=1.6.0'. See Compatibility. -
Fix install conflicts with Airflow constraint files. If you install with
-c <airflow constraints>, pip can't resolve the install. The constraint files pinclickandanyiobelow whatacryl-datahubneeds (click>=8.3.3,anyio>=4.14.2). Download the constraints file, replace theanyioandclicklines withanyio>=4.14.2andclick>=8.3.3, and install with-con the edited file. Keep every other pin as published. See Installing with Airflow constraints. -
Turn the plugin off if you need to. Use either method:
- Set
enabled = Falsein the[datahub]section ofairflow.cfgand restart Airflow. - Set
AIRFLOW_VAR_DATAHUB_AIRFLOW_PLUGIN_DISABLE_LISTENER=true. The listener then processes nothing, and you don't need a restart.
- Set
Cloud and OSS: The plugin runs in your own Airflow environment, so you set these variables there for both DataHub Cloud and OSS.