Timeout in Function App hosted in App Service plan

Majid N | BIMAGE 0 Reputation points
2024-04-01T09:16:33.2666667+00:00

My Azure time_triggered function app which is hosted in app service plan shows following error:

Timeout value of 00:05:00 exceeded by function 'Functions.TimerTrigger1' (Id: 'acd62752-5c30-4ba9-8ee6-f21eb7bf11f6'). Initiating cancellation.

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

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 94,711 Reputation points MVP
    2024-04-01T09:30:14.4166667+00:00

    Hi @Majid N | BIMAGE ,

    by default the timeout of a function in a consumption plan is 5 minutes and can be increased to 10 minutes at the maximum:

    Function app timeout duration

    To increase the timeout you can edit the "functionTimeout" value in the host.json: Sample host.json file


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


  2. TP 74,231 Reputation points
    2024-04-01T09:35:35.1866667+00:00

    Hi,

    Please confirm that you have set functionTimeout to higher value in your function app's host.json file. Additionally, please make sure Always on is set to On in your Function App -- Configuration blade -- General settings tab.

    For example, you might set functionTimeout to 30 minutes in your host.json file, snippet below:

    {
        "functionTimeout": "00:30:00" 
    }
    
    

    host.json reference - functionTimeout

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP