Durable Orchestrator Function Executing More Than Expected.

Andrew Hawes 181 Reputation points
2021-01-21T08:01:59.383+00:00

I have a Durable Orchestrator Function that is triggered by a Timer Trigger Function every 5 minutes but the Invocation logs for the Durable Function Orchestrator show it being invocated multiple times every 5 minutes.

My expectation is, regardless of the number of instances my Azure Functions has scaled to, that the Timer Trigger would only execute once per time period. This seems to be validated by the Invocation log for the Timer Function.

58969-image.png

Because the Timer function only seems to be executing once I would only expect that the Durable Orchestrator Function would only be triggered once. But this does not seem to be the case. The Invocation logs show multiple per 5 minute period.

59061-image.png

And if you look at the file system logs it shows even more.

58909-image.png

I even tried to follow the instructions at "Singleton orchestrators in Durable Functions" but it did not seem to help.
https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-singletons?tabs=csharp

Even when the Functions App has scaled to more than one instance I only want the Durable Orchestrator Function to execute once and by extension the also the Activity Functions it triggers. Eventually, the Durable functions end up writing to a Queue. I understand and expect that the Queue Function may be executed over multiple instances. This is how I understood the Fan-Out pattern to work. What I don't understand is why the Durable Orchestrator Function seems to be running more than once every 5 minutes.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.