How can I increase the timeout on my durable function app?

Shah, Maitree 0 Reputation points
2024-07-27T18:25:56.25+00:00

Hello,

I am currently using a consumption plan for my function app, but I need to process files that may take longer than 1 hour. Will using a durable function app solve this issue? Additionally, if I add the following code to my local settings, will it change anything?

"extensions": {
  "durableTask": {
    "maxTimeout": "03:00:00"
  }
}
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,937 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Abiola Akinbade 29,570 Reputation points Volunteer Moderator
    2024-07-28T01:56:51.0233333+00:00

    Yes, using durable functions can help solve this issue. Durable Functions can handle much longer time frames

    To apply this setting in the Azure environment, you need to configure it in the host.json file of your function app.

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola


  2. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2024-07-29T18:43:40.8866667+00:00

    Hi @Shah, Maitree,

    I get the sense you're asking this question after reviewing function app timeout duration. Please be aware that simply changing your function to a durable function won't address your immediate issue. The purpose of durable functions is to create a function that maintains state throughout an asynchronous execution. This framework is suggested if your HTTP trigger takes longer than the 230 second max for sending a response back to the client. If your trigger is something else, you encounter this specific restriction.

    Furthermore, if you continue to leverage a durable function on a consumption plan, you will still be limited to a 10-minute execution timeout. Since you're estimating processing time to take an hour, you should consider moving towards a flex consumption plan SKU or higher. In addition, you'll need to apply retry policies in order to account for any scheduled patching that may occur during function execution.

    0 comments No comments

Your answer

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