-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Airflow scheduler stopped working #35272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I met this problem as well. Airflow version 2.5.1. |
We've also run into this problem. It only affects DAGs which have a start_time with a timezone, which have not gotten a new dag_run since the weekend. Our scheduler logs also look similar to OP. The schedule for our affected DAGs is |
I have created a drawing of what the current state is. So basically there is one dag run created (the middle one), that is questionable if it should ever be created. Also after creating these the scheduler stops, in the logs I can see the next dag run is calculated as This test reproduces the calculation:
And fails to succeed. I would love some advice from someone at Airflow what would be the best behavior. @potiuk can you help me find someone I can discuss solutions with? I believe it should never have created these 3 dag runs but instead should have created a dagrun with:
Any thoughts? As for a workardound I have two for people:
|
You've done all you could hopefully someone will take a look and help you. I am individual contributor and I have no power over telling other volunteers to do with their free time. But you described it well enough and I hope someone here will be able to help you. I keep fingers crossed. |
@potiuk I'm happy to take a look :) |
this issue is a duplicate of #7999 and can be closed |
I am not sure if this is really a duplicate of #7999. It‘s related, but at least in our case the scheduler completely stopped executing that DAG until we removed the timezone from the start_date. |
I just wanted to pitch in and make sure that a fix is provided for this issue. I see a long discussion on PR: #30083 on whether it is breaking existing functionality. On this I have 2 thoughts:
Please make sure that whatever solution you choose, calculating the next dagrun works across DST transitions when using a non UTC timezone. |
@nclaeys ”0 9 * * *” should already work at 9 in the timezone of your DAG as it is a fixed schedule. The problem is for schedules like “0 9,10 * * *” which involve intervals, they will run at the same time relative to UTC (which means they shift with time changes, so e.g. not always at 9am local time). This is what the linked PR seeks to adjust. It is possible that one of the unintended side effects of the current interval timetable behavior is that certain runs get swallowed up, as the schedule tries to calculate the “next” run without adjusting for DST, this run gets skipped and so subsequent runs dont get calculated or run until you jiggle the scheduler’s calculations by tweaking the inputs to the timetable (e.g. start date). This is just a theory (which I have also seen, so its not just the OP @stijndehaes / @pspeter ), but its also possible that this is completely unrelated to timezone stuff. |
Yes you are right, but the crashing pipelines use a cron expression like "0 9,10 * * *", my first comment was more like what I expect when using timezones and cron expression as there is typically a reason why I use local timezone and business expects the pipeline to run at a given time regardless of whether it is DST or not. The crashing issue is caused by how you handle timezones, which you can check by running the following test:
If the dag I use has a timezone ("Europe/Brussels") and a cron expression as specified this test never finishes. If I run it using UTC it does work correctly. |
Should hopefully be resolved in #35887 |
This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author. |
This issue has been closed because it has not received response from the issue author. |
Apache Airflow version
2.7.2
What happened
When running a DAG with a timezone set to
Europe/Brussels
we noticed it stopped being scheduled around the 29th, this is right around summer/winter time change. The scheduled logs show:What you think should happen instead
The dag should continue to be scheduled
How to reproduce
Run the DAG attached below, I reproduced this case using the docker-compose setup from the docs.
Operating System
MAC OS, also linux
Versions of Apache Airflow Providers
Default ones included in docker-compose setup
Deployment
Docker-Compose
Deployment details
It also happens on a kubernetes cluster, the installation does not matter
Anything else
At one point the DAG started scheduling again, but I can still reproduce the case.
I am willing to create a PR but don't know where to start looking for this
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: