thesuperzapper commented on issue #31200: URL: https://github.com/apache/airflow/issues/31200#issuecomment-1546765025
@potiuk on a related note, I believe that the [`scheduler_health_check_threshold`](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#scheduler-health-check-threshold) config is ignored since airflow 2.6.0, this is because [`SchedulerJobRunner.is_alive()`](https://github.com/apache/airflow/blob/3193857376bc2c8cd2eb133017be1e8cbcaa8405/airflow/jobs/scheduler_job_runner.py#L267-L286) is not called anymore, only the [`Job.is_alive()`](https://github.com/apache/airflow/blob/3193857376bc2c8cd2eb133017be1e8cbcaa8405/airflow/jobs/job.py#L123-L137) which does not consider the config. This is because, since PR https://github.com/apache/airflow/pull/30302, the SQL query used by the `/health` endpoint returns a `Job` rather than a `SchedulerJobRunner` instance. This means that the [`job_heartbeat_sec`](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#job-heartbeat-sec) is used instead, and as that has a default of `5` seconds (compared with the `scheduler_health_check_threshold` default of `30`), I expect we will see many users reporting their Schedulers are unhealthy. Also, I think airflow's internal checking for the health of the scheduler is NOT affected by this bug, as it looks like [`adopt_or_reset_orphaned_tasks()`](https://github.com/apache/airflow/blob/3193857376bc2c8cd2eb133017be1e8cbcaa8405/airflow/jobs/scheduler_job_runner.py#L1565) correctly uses `scheduler_health_check_threshold`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
