Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 2.97 KB

functions-timeout-duration.md

File metadata and controls

28 lines (24 loc) · 2.97 KB
author ms.service ms.custom ms.topic ms.date ms.author
ggailey777
azure-functions
build-2024
include
06/27/2024
glenga

Function app timeout duration

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
  1. 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.
  2. 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.
  3. Requires the App Service plan be set to Always On. A grace period of 10 minutes is given during platform updates.
  4. The default timeout for version 1.x of the Functions host runtime is unbounded.
  5. When the minimum number of replicas is set to zero, the default timeout depends on the specific triggers used in the app.