Hi all

I just wanted to check to what extent the advice in [1] and [2], namely to restart the scheduler "every once in a while", is still considered accurate?

"Restart your scheduler process to get a clean environment every once in a while. Use --num_runs N scheduler CLI option to make it stop after N runs and have some supervisor ensuring it is always running. See issue 698"

"The scheduler should be restarted frequently

In our experience, a long running scheduler process, at least with the CeleryExecutor, ends up not scheduling some tasks. We still don’t know the exact cause, unfortunately.

Fortunately, airflow has a built-in workaround in the form of the — num_runs flag. It specifies a number of iterations for the scheduler to run of its loop before it quits. We’re running it with 10 iterations, Airbnb runs it with 5. Note that this will cause problems when using the LocalExecutor."

Both documents are pretty now, so I assume this is considered still relevant. Could you give some guidance on what kind of frequency is recommended here, or is that very dependent on the particular installation?

Also, which of the current JIRA issues (if any) is the new version of "issue 698" as mentioned in the first quote? There seem to be quite a few issues relating to the scheduler getting stuck [3] - which one(s) should we follow and/or add information to to best track progress on this topic?

Thanks!

ap


[1] https://cwiki.apache.org/confluence/display/AIRFLOW/Common+Pitfalls
[2] https://medium.com/handy-tech/airflow-tips-tricks-and-pitfalls-9ba53fba14eb#.ahcprdr9r [3] https://issues.apache.org/jira/browse/AIRFLOW-39?jql=project%20%3D%20AIRFLOW%20AND%20text%20~%20%22scheduler%22

Reply via email to