0

I have an azure function app with many function. One of these is a durable function (Starter, orchestrator, and activity). I want to set the timeout of my durable function (and not my other functions) to 10 minutes. From what I understand this is configurable in the host.json file.

I have configured mine as below:

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.*, 4.0.0)"
  },
  "extensions": {
    "durableTask": {
      "functionTimeout": "00:10:00"
    }
  }
}

I get an error (yellow underline in VScode) under the functionTimeout stating: Property functionTimeout is not allowed.

However if I move the function time out the parent level I do not get this error. The only problem with this solution is that it will set the function timeout of all my functions, durable and non-durable, to 10 minutes. Is there a way to configure this correctly?

1 Answers1

0

Host.json:

{
    "functionTimeout": "00:05:00"
}

enter image description here

Regardless of the number of functions you create, host.json is common Application setting file for that project and functionTimeout is the common attribute for all the functions.

  • You can change the values of Timeout in Runtime environments (dev, prod) by using the AzureFunctionsJobHost__functionTimeout attribute in the Application Settings Configuration to override the host.json file as specified in this MS Doc.

The only problem with this solution is that it will set the function timeout of all my functions, durable and non-durable, to 10 minutes. Is there a way to configure this correctly?

It’s not possible to set the timeout per function level as stated in this SO Issue1 and Issue2 where you can use the durable functions for implementing delays or timeouts for async actions and can split up the large functionality into multiple activity functions to experience better.

Pravallika KV
  • 2,415
  • 2
  • 2
  • 7