Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions timeout for Consumption plan

Is there a way to change the current 5 minutes timeout limit for Azure Functions running under the Consumption plan ?

For some data analytics computations 5 minutes is not enough time.

The alternative of using webjobs doesn't allow parallel execution of the function.

like image 609
donquijote Avatar asked Feb 21 '17 03:02

donquijote


People also ask

Do Azure functions have a timeout?

The Azure Function Timeout is difference depending on which hosting method / pricing tier is used to host an Azure Function App. While in the Consumption plan, the default timeout is 5 minutes, there is a different default and maximum timeouts for the Premium and Dedicated pricing tiers.

How long can an Azure function run for?

How Long Can Azure Functions Run? For any Azure Functions, a single Function execution has a maximum of 5 minutes by default to execute. If the Function is running longer than the maximum timeout, then the Azure Functions runtime can end the process at any point after the maximum timeout has been reached.

Which properties of Azure functions are used for billing when the consumption plan is used?

Consumption. Azure Functions consumption plan is billed based on per-second resource consumption and executions.


2 Answers

(Other answer is a bit confusing, so writing instead of editing a lot)

Azure Functions can now run up to 10 minutes using the consumption plan by adding the functionTimeout setting to your host.json file:

In a serverless Consumption plan, the valid range is from 1 second to 10 minutes, and the default value is 5 minutes.

In both Premium and Dedicated (App Service) plans, there is no overall limit, and the default value is 30 minutes. A value of -1 indicates unbounded execution, but keeping a fixed upper bound is recommended

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

File: host.json

// Value indicating the timeout duration for all functions. // Set functionTimeout to 10 minutes {     "functionTimeout": "00:10:00" } 

Source:
https://buildazure.com/2017/08/17/azure-functions-extend-execution-timeout-past-5-minutes/
https://github.com/Azure/azure-webjobs-sdk-script/wiki/host.json

like image 70
Manohar Reddy Poreddy Avatar answered Oct 26 '22 12:10

Manohar Reddy Poreddy


Azure Functions can now run up to 10 minutes using the consumption plan: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout

like image 29
Thiago Custodio Avatar answered Oct 26 '22 12:10

Thiago Custodio