GitHub user nchiht edited a discussion: Airflow scheduler is not sending heartbeat - not spawning subprocesses (DagFileProcessManager, workers,...) when running in daemon mode
### **Prerequisites:** - Airflow 2.10.5 - Python 3.10.12 - LocalExecutor & postgresql - Ubuntu 22.04 ### **Problem** - I first activated my python env, exported `AIRFLOW_HOME` variable, then started airflow webserver in daemon mode normally with: `airflow webserver -p 8080 -D`. - When I started airflow scheduler with daemon mode: `airflow scheduler -D`, the webserver UI informed me that there is no scheduler heartbeat and I can even not manually trigger dags. However, when I run it in the foreground, every thing runs smoothly. (I make sure that i killed processes of old scheduler process including 1 master process and the command process) - <img width="1492" alt="Screenshot 2025-04-11 at 15 44 41" src="https://github.com/user-attachments/assets/1c825236-29ac-445f-8aeb-ba83cd76f469" /> - After researching about scheduler's heartbeat, I was provided that scheduler periodically write timestamp "heartbeat" to database. Moreover, I saw that there was no **DagFileProcessManager** process and other executor processes. I could not come into conclusion whether the scheduler's process is stucked in kinda a loop or got failed silently before spawning subprocesses. - Another thing is that, whenever I tried to shut down foreground scheduler making some tests, it noticed that _it is waiting for running tasks to finish_ though i turned off all my dags <img width="1492" alt="image" src="https://github.com/user-attachments/assets/3b45594b-415b-441e-8880-ffdb18a4b46d" /> _Can someone explain what is going on?_ GitHub link: https://github.com/apache/airflow/discussions/49109 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
