1

Please could someone confirm my thoughts.

I have an orchestration, which is calling the same Activity say 400 times. I'm using a fan-out/fan-in concept.

await Task.WhenAll(collectionOfTasks);

If those 400 activities take longer than 10 minutes in total to process, it seems that it doesn't complete, and doesn't pick up/continue again, unless another call is made to the orchestration method.

Is this right? Does the Azure Function shut down if nothing is running in the Orchestration for 10 minutes? Doesn't matter if the Activities functions are still running?

1 Answer 1

3

Note that each individual function execution on a consumption Functions application can only run for 10 minutes before the application is recycled by the Azure infrastructure. This is a little nuanced for orchestrations, as they can effectively run forever, as every time they await an activity function, the execution stops, and once the activity finishes, the execution will resume. As long as you design your orchestration function so that it never runs for more than 10 minutes at a time, it can effectively run forever.

What you may be running into is one (or more) of your 400 activity function executions taking longer than 10 minutes. If that is the case, it could be recycling the application, and not restarting until make another call to the orchestration method.

1
  • I've been able to create a demo in git github.com/pmatthews05/DurableFunctionTest. You will need a local.settings.json file to point to an AzureWebJobsStorage. Each activity function runs for 1 minute, under 10 minutes. Using postman, sometimes the call localhost:7071/api/RunTest runs to the end, other times checking the status, it still saying running, but nothing is happening. Jan 19, 2019 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.