I am running an azure function with basic plan in portal. I am getting this timeout error and my function is not running because of this reason. How I can resolve this issue
Locate the host. json file underneath the WWWROOT folder / directory within the App. By default this file will be empty. You can then add the functionTimeout property and set it to your desired timeout threshold, such as 10 minutes (00:10:00).
Function app timeout duration Regardless of the function app timeout setting, 230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request. This is because of the default idle timeout of Azure Load Balancer.
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.
The host. json metadata file contains configuration options that affect all functions in a function app instance. This article lists the settings that are available starting with version 2. x of the Azure Functions runtime.
2021-09-17T08:13:47.525 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.***Func' (Id: '32daf701-18de-467c-b36e-b0b7********'). Initiating cancellation. By default, Azure function will timeout in 5 minutes. The maximum for consumption plan is 10 minutes.
2021-09-17T08:13:47.525 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.***Func' (Id: '32daf701-18de-467c-b36e-b0b7********'). Initiating cancellation. By default, Azure function will timeout in 5 minutes.
Remember, the default without overriding the setting will be 5 minutes (00:05:00). The “ host.json ” file is a global configuration file for an Azure Functions App.
Even with Always On enabled, the execution timeout for individual functions is controlled by the functionTimeout setting in the host.json project file. For more details you could refer to this article. Show activity on this post. Thanks for contributing an answer to Stack Overflow!
Azure Functions are now allowed to run upto 10 minutes. You need to change the "functionTimeout" value in host.json file.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#consumption-plan https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout
Also, please check a similar question posted on SO: Azure Functions timeout for Consumption plan
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With