dagProcessor liveness probe always fails #69667
Replies: 8 comments 1 reply
-
|
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
|
Turns out there is a running dagProcessor job in the db but the cli used for the health check returns no alive jobs
It seems that maybe the dagProcessor is not sending a heartbeat? Guessing this is because the heartbeat is Maybe due to the config option |
Beta Was this translation helpful? Give feedback.
-
|
If you don't see missing dags or in the dag-processor logs, you see that the dag-processor is working, I would assume that there is high CPU usage + maybe some bottlenecks on the database, and the healthcheck command just passes the execution timeout. If that is the case, you can modify resources, maybe optimise Dags code regarding parsing and execution layers (https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html#top-level-python-code, which in general should decrease workload on the Dag Processor) and tweak a little Dag Processor configuration like parsing processor, etc. From more fixes like workarounds, there are some options regarding the probe itself within the chart: https://github.com/apache/airflow/blob/helm-chart/1.22.0/chart/values.yaml#L3052. |
Beta Was this translation helpful? Give feedback.
-
|
What is the value of |
Beta Was this translation helpful? Give feedback.
-
Yes its because of just increase health_check_threshold for the dag_processor |
Beta Was this translation helpful? Give feedback.
-
|
Same problem here on Airflow 3.2.1 (KubernetesExecutor + CeleryExecutor). SELECT id, hostname, state,
latest_heartbeat,
EXTRACT(EPOCH FROM (now() - latest_heartbeat)) AS age_seconds
FROM job
WHERE job_type = 'DagProcessorJob'
ORDER BY latest_heartbeat DESC
LIMIT 30;age_seconds oscillates continuously between ~30 and ~60s and never drops close to 0. Setting AIRFLOW__DAG_PROCESSOR__HEALTH_CHECK_THRESHOLD=120 fixes it, as mentioned above. I also tried increasing parsing_processes and min_file_process_interval, but these had no effect on age_seconds. |
Beta Was this translation helpful? Give feedback.
-
|
Would it be possible/correct to update this default in the helm chart then? |
Beta Was this translation helpful? Give feedback.
-
This indicates insufficient resources on the database, such as CPU or IOPS.
To be honest, I don't see the reason to do that. At least for now, there is a lack of information regarding particular components' configurations and resources, as well as the dags' characteristics themselves, which are impacting the load on both the dag processor and the database. From my experience with quite big Airflow environments (comparing, e.g. to the data from the Airflow Survey), when the database is correctly configured with quality gates for dags code and some tweaks to dag processor configuration (depending on the dags characteristics), the default settings are sufficient. Also, adjusting this configuration is easy, and I would say not problematic. If adjusting it wasn't possible, it would be a totally different story. I will convert this issue to a discussion since we don't have enough data to determine whether it is environment-specific or an Apache Airflow issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Under which category would you file this issue?
Helm chart
Apache Airflow version
3.2.2 (helm 1.2.2)
What happened and how to reproduce it?
Default helm chart uses livenessProbe with
command: ~for dagProcessor.This uses the default command to check liveness which always fails:
airflow jobs check --job-type DagProcessorJob --hostname $(hostname)Causing the dagProcessor to be restarted by k8s every 5min (livenessProbe failure)
What you think should happen instead?
No response
Operating System
No response
Deployment
Official Apache Airflow Helm Chart
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
1.22.0 (latest released)
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions