Issue with Azure Function Timeout Despite Extended Configuration

Finlay Thomas 0 Reputation points
2025-05-05T14:38:05.5566667+00:00

Hi,

I'm facing an issue with an Azure Function App timing out unexpectedly, even though I've set the timeout limit to the maximum allowed in the host.json file.

Here's what I've done so far:

Function runtime: .NET 6 (isolated)

Hosting plan: Premium (EP1)

Timeout setting in host.json:

json
CopyEdit
{
  "functionTimeout": "10:00:00"
}

The function is triggered via an HTTP request and processes a large dataset.

Despite this, the function consistently stops after about 5 minutes. I’ve checked for any Application Insights logs or errors, but nothing stands out.

Has anyone run into this before? Am I missing another timeout setting (maybe at the App Service or networking level)?

Appreciate any advice—thanks!

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

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 3,435 Reputation points Microsoft External Staff Moderator
    2025-05-06T05:37:44.4366667+00:00

    Hi Finlay Thomas,

    It seems like you are experiencing an issue with your Azure Function timing out despite configuring the timeout limit in the host.json file. Let's troubleshoot this together.

    Based on the information you provided, you have set the functionTimeout to 10 hours (10:00:00) in the host.json file, but the function stops after about 5 minutes. This behavior could be due to the default timeout for HTTP triggered functions in Azure Functions.

    Regardless of the functionTimeout setting in the host.json file, HTTP triggered functions in Azure Functions have a maximum response time of 230 seconds (about 3 minutes and 50 seconds) due to the default idle timeout of Azure Load Balancer. This means that even if you set a longer functionTimeout, the function will still be terminated after 230 seconds.

    • Since you are using a Premium hosting plan, you have a default timeout of 30 minutes. However, for HTTP triggered functions, the 230-second limit still applies. Consider using Durable Functions or other patterns to handle long-running processes.
    • Ensure that there are no errors or exceptions in your function code that might be causing it to terminate prematurely.

    To help you better understand, please refer to the documentation below:

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=isolated-process%2Cv4&pivots=programming-language-csharp#function-app-time-out-duration

    For further clarification on these issue, please refer to these thread as well.

    By considering these options and best practices, you can effectively handle long-running processes in your Azure Function. If you have any more questions or need further assistance, feel free to ask.

    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.