CodexBloom - Programming Q&A Platform

How to handle Azure Functions timeout when using Durable Functions with long-running workflows?

šŸ‘€ Views: 56 šŸ’¬ Answers: 1 šŸ“… Created: 2025-06-09
azure durable-functions timeout C#

I'm working through a tutorial and I keep running into I keep running into I'm currently building an application using Azure Durable Functions (v2) to orchestrate a series of long-running tasks... The workflow includes activities that can take several minutes, and I'm running into a timeout scenario. I've configured my function with the default timeout setting of 5 minutes, but I need my orchestrator to run longer. I've tried updating the `FunctionTimeout` in the host.json configuration like this: ```json { "functionTimeout": "00:30:00" } ``` However, I'm still receiving the following behavior after 5 minutes when the orchestrator tries to complete: ``` Function 'YourOrchestratorFunction' failed with behavior: Timeout. (Function timeout exceeded) ``` I also checked the `DurableTask` settings and made sure they're configured correctly, but I’m still hitting the wall with the 5-minute execution limit. Additionally, I've looked into the `DurableOrchestrationContext` for any possibility to extend the timeout dynamically but couldn't find any suitable methods. Is there a recommended approach or best practice for handling situations like this without getting exploring with the function timeout? Any guidance or examples would be greatly appreciated! I'm working with C# in a Docker container on CentOS. I appreciate any insights! My team is using C# for this mobile app.