Share via

Changing timeout of Azure Function Flex plan

Mohamed Hussein 650 Reputation points
Jan 26, 2025, 6:58 PM

Good Day,

I changed the host.json to to the following, but still terminate after 30 minutes

Shouldn't 00:00:00 set to infinity?

Function Name HusAzFuncBulkUploadMSISDN


{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    },
    "logLevel": {
      "default": "Warning",
      "HusAzFuncBulkUploadMSISDN": "Information"
    }
  },
  "functionTimeout": "00:00:00"
}

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,536 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 2,065 Reputation points Microsoft External Staff
    Jan 27, 2025, 6:07 AM

    Hi @Mohamed Hussein ,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    The functionTimeout property in the host.json file for Azure Functions does not set the timeout to infinity when you specify "00:00:00". Instead, for the Flex Consumption plan, the maximum execution timeout is unbounded, but there are specific conditions that apply.

    Even though you set the timeout to "00:00:00", the function may still terminate after 30 minutes due to the default settings or other constraints in the Azure environment. It's important to ensure that the function app is configured correctly and that there are no other settings or limits that might be affecting the execution time.

    To avoid timeouts, consider reviewing the Azure Functions documentation for best practices and ensuring that your function is robust enough to handle long-running tasks.

    Also, for your better understanding, please refer to the following documentation:

    Azure Functions hosting options

    Azure Functions runtime versions overview

    I hope this helps! Let me know if you have any further questions or need additional assistance.

    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.