CodexBloom - Programming Q&A Platform

Handling Azure Function Timeout Issues with Durable Functions in .NET

👀 Views: 0 đŸ’Ŧ Answers: 1 📅 Created: 2025-09-01
azure-functions durable-functions timeout C#

I'm learning this framework and I'm not sure how to approach I'm working on a project and hit a roadblock. I've been struggling with this for a few days now and could really use some help. Hey everyone, I'm running into an issue that's driving me crazy... I've been struggling with this for a few days now and could really use some help. I'm currently developing an Azure Function that processes a series of tasks using Durable Functions in .NET 6. I've set up the orchestration function to manage these tasks, but I'm encountering issues with timeouts. Despite specifying a `FunctionTimeout` of 10 minutes in the host.json file, the orchestration seems to timeout after 5 minutes with an error message stating `Function 'MyOrchestratorFunction' failed: exceeded maximum duration of 300 seconds.` Here's a snippet of my `host.json` configuration: ```json { "version": "2.0", "functionTimeout": "00:10:00" } ``` And my orchestration function looks like this: ```csharp [FunctionName("MyOrchestratorFunction")] public static async Task RunOrchestrator([OrchestrationTrigger] IDurableOrchestrationContext context) { var result1 = await context.CallActivityAsync<string>("ActivityFunction1", null); var result2 = await context.CallActivityAsync<string>("ActivityFunction2", result1); return result2; } ``` I've also ensured that the individual activity functions are not exceeding their own timeout limits, but the orchestration seems to be getting prematurely terminated. I've tried deploying this to both a Consumption plan and a Premium plan, but the behavior remains consistent. Is there a specific setting or a best practice that I'm missing to ensure that my Durable Function orchestration runs for the full duration specified? Any insights or solutions would be greatly appreciated. I'm working on a service that needs to handle this. Any ideas what could be causing this? My development environment is Linux. How would you solve this? For context: I'm using C# on Windows. Any help would be greatly appreciated! My team is using C# for this desktop app. Thanks, I really appreciate it! I recently upgraded to C# 3.11. I'd love to hear your thoughts on this.