Azure / azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
MIT License
715 stars 271 forks source link

Orchestrator keeps triggering Activities despite having no Runtime Status #2684

Open flavio-vgt opened 11 months ago

flavio-vgt commented 11 months ago

Description

We are using Durable Function Orchestrators to run data import jobs on our application. Since the start of the month we experienced a high increase in compute cost on our Azure bill. We found out that multiple Orchestrator Functions are calling multiple thousand Activity Functions each. The Orchestrator functions responsible did not have any Runtime Status set nor any CreatedTime. We are using the Application Routing architecture from here:

Expected behavior

Orchestrator Functions with no RuntimeStatus or CreatedTime should not be able to trigger Activity Functions.

Actual behavior

Over the span of a couple of days (~20) we found upwards of 100k Messages in the DurableTaskHistory table which linked to the Orchestrator function.

Relevant source code snippets

// insert code snippet here

Known workarounds

We looked into the Application Insight logs and manually deleted the Orchestrator Instance and the History from the Azure Table Storage, which killed the Orchestrator and prevented it from generating more traffic. (We left one Orchestrator Instance for analysis)

App Details

Screenshots

image

If deployed to Azure

ZhivomirZlatinov commented 11 months ago

Hello team, I am the Azure support engineer currently working on case number 2311200050005516 related to this support request. I have reviewed the logs available on the App Service level, but could not find a cause for the issue. Would you be able to assist with this as we believe that there is a potential bug?

cgillum commented 11 months ago

Hi @flavio-vgt. Apologies for the delay. We're taking a look at this and will follow up with you via the support ticket.