author | ms.service | ms.custom | ms.topic | ms.date | ms.author | |
---|---|---|---|---|---|---|
ggailey777 |
azure-functions |
|
include |
06/27/2024 |
glenga |
The timeout duration for functions in a function app is defined by the functionTimeout
property in the host.json project file. This property applies specifically to function executions. After the trigger starts function execution, the function needs to return/respond within the timeout duration. To avoid timeouts, it's important to write robust functions. For more information, see Improve Azure Functions performance and reliability.
The following table shows the default and maximum values (in minutes) for specific plans:
Plan | Default | Maximum1 |
---|---|---|
Consumption plan | 5 | 10 |
Flex Consumption plan | 30 | Unbounded2 |
Premium plan | 304 | Unbounded2 |
Dedicated plan | 304 | Unbounded3 |
Container Apps | 30 | Unbounded4 |
- 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. For longer processing times, consider using the Durable Functions async pattern or defer the actual work and return an immediate response.
- There is no maximum execution timeout duration enforced. However, the grace period given to a function execution is 60 minutes during scale in for the Flex Consumption and Premium plans, and a grace period of 10 minutes is given during platform updates.
- Requires the App Service plan be set to Always On. A grace period of 10 minutes is given during platform updates.
- The default timeout for version 1.x of the Functions host runtime is unbounded.
- When the minimum number of replicas is set to zero, the default timeout depends on the specific triggers used in the app.