You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event-driven scaling automatically reduces capacity when demand for your functions is reduced. It does this by draining instances of their current function executions and then removes those instances. This behavior is logged as drain mode. The grace period for functions that are currently executing can extend up to 10 minutes for Consumption plan apps and up to 60 minutes for Premium plan apps. Event-driven scaling and this behavior don't apply to Dedicated plan apps.
98
+
Event-driven scaling automatically reduces capacity when demand for your functions is reduced. It does this by draining instances of their current function executions and then removes those instances. This behavior is logged as drain mode. The grace period for functions that are currently executing can extend up to 10 minutes for Consumption plan apps and up to 60 minutes for Flex Consumption and Premium plan apps. Event-driven scaling and this behavior don't apply to Dedicated plan apps.
99
99
100
100
The following considerations apply for scale-in behaviors:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-premium-plan.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,8 +145,7 @@ To learn more about how scaling works, see [Event-driven scaling in Azure Functi
145
145
146
146
Functions in a Consumption plan are limited to 10 minutes for a single execution. In the Premium plan, the run duration defaults to 30 minutes to prevent runaway executions. However, you can [modify the host.json configuration](./functions-host-json.md#functiontimeout) to make the duration unbounded for Premium plan apps, with the following limitations:
147
147
148
-
+ Platform upgrades can trigger a managed shutdown and halt the function execution.
149
-
+ Platform outages can cause an unhandled shutdown and halt the function execution.
148
+
+ Platform upgrades can trigger a managed shutdown and halt the function execution with a grace period of 10 minutes.
150
149
+ There's an idle timer that stops the worker after 60 minutes with no new executions.
151
150
+[Scale-in behavior](event-driven-scaling.md#scale-in-behaviors) can cause worker shutdown after 60 minutes.
152
151
+[Slot swaps](functions-deployment-slots.md) can terminate executions on the source and target slots during the swap.
| Max memory (GB per instance) | 1.5 | 4<sup>14</sup> | 3.5-14 | 1.75-14/3.5-14 |[varies](/azure/container-apps/billing)|
20
-
| Max instance count (Windows/Linux) | 200/100 | 1000 <sup>15</sup> | 100/20 | varies by SKU/100<sup>10</sup> | 10-300<sup>19</sup> |
20
+
| Max instance count (Windows/Linux) | 200/100 | 1000 <sup>15</sup> | 100/20 | varies by SKU/100<sup>10</sup> | 10-300<sup>18</sup> |
21
21
| Function apps per plan<sup>12</sup> | 100 | 100 | 100 | unbounded<sup>4</sup> | unbounded<sup>4</sup> |
22
22
|[App Service plans](/azure/app-service/overview-hosting-plans)| 100 per [region](https://azure.microsoft.com/global-infrastructure/regions/)| n/a | 100 per resource group |100 per resource group | n/a |
23
23
|[Deployment slots](/azure/azure-functions/functions-deployment-slots) per app<sup>11</sup> | 2 | n/a | 3 | 1-20<sup>10</sup> | not supported |
@@ -29,21 +29,20 @@ ms.author: glenga
29
29
Notes on service limits:
30
30
31
31
1. By default, the timeout for the Functions 1.x runtime in an App Service plan is unbounded.
32
-
2. Requires the App Service plan be set to [Always On](/azure/azure-functions/dedicated-plan#always-on). Pay at standard [rates](https://azure.microsoft.com/pricing/details/app-service/).
32
+
2. Requires the App Service plan be set to [Always On](/azure/azure-functions/dedicated-plan#always-on). Pay at standard [rates](https://azure.microsoft.com/pricing/details/app-service/). A grace period of 10 minutes is given during platform updates.
33
33
3. These limits are [set in the host](https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/web.config).
34
34
4. The actual number of function apps that you can host depends on the activity of the apps, the size of the machine instances, and the corresponding resource utilization.
35
35
5. The storage limit is the total content size in temporary storage across all apps in the same App Service plan. For Consumption plans on Linux, the storage is currently 1.5 GB.
36
36
6. Consumption plan uses an Azure Files share for persisted storage. When you provide your own Azure Files share, the specific share size limits depend on the storage account you set for [WEBSITE_CONTENTAZUREFILECONNECTIONSTRING](/azure/azure-functions/functions-app-settings#website_contentazurefileconnectionstring). On Linux, you must [explicitly mount your own Azure Files share](/azure/azure-functions/storage-considerations#mount-file-shares) for both Flex Consumption and Consumption plans.
37
37
7. When your function app is hosted in a [Consumption plan](/azure/azure-functions/consumption-plan), only the CNAME option is supported. For function apps in a [Premium plan](/azure/azure-functions/functions-premium-plan) or an [App Service plan](/azure/azure-functions/dedicated-plan), you can map a custom domain using either a CNAME or an A record.
38
-
8.Guaranteed for up to 60 minutes.
38
+
8.There is no maximum execution timeout duration enforced. However, the grace period given to a function execution is 60 minutes[during scale in](../articles/azure-functions/event-driven-scaling.md#scale-in-behaviors) and 10 minutes during platform updates.
39
39
9. Workers are roles that host customer apps. Workers are available in three fixed sizes: One vCPU/3.5 GB RAM; Two vCPU/7 GB RAM; Four vCPU/14 GB RAM.
40
40
10. See [App Service limits](/azure/azure-resource-manager/management/azure-subscription-service-limits#app-service-limits) for details.
41
41
11. Including the production slot.
42
42
12. There's currently a limit of 5000 function apps in a given subscription.
43
43
13. The Flex Consumption plan is currently in preview.
44
44
14. Flex Consumption plan instance sizes are currently defined as either 2,048 MB or 4,096 MB. For more information, see [Instance memory](/azure/azure-functions/flex-consumption-plan#instance-memory).
45
45
15. Flex Consumption plan during preview has a regional subscription quota that limits the total memory usage of all instances across a given region. For more information, see [Instance memory](/azure/azure-functions/flex-consumption-plan#instance-memory).
46
-
16. In a Flex Consumption plan, the host doesn't enforce an execution time limit. However, there are currently no guarantees because the platform might need to terminate your instances during scale-in, deployments, or to apply updates.
47
-
17. When the [minimum number of replicas](/azure/container-apps/scale-app#scale-definition) is set to zero, the default timeout depends on the specific triggers used in the app.
48
-
18. When the [minimum number of replicas](../articles/container-apps/scale-app.md#scale-definition) is set to one or more.
49
-
19. On Container Apps, you can set the [maximum number of replicas](/azure/container-apps/scale-app#scale-definition), which is honored as long as there's enough cores quota available.
46
+
16. When the [minimum number of replicas](/azure/container-apps/scale-app#scale-definition) is set to zero, the default timeout depends on the specific triggers used in the app.
47
+
17. When the [minimum number of replicas](../articles/container-apps/scale-app.md#scale-definition) is set to one or more.
48
+
18. On Container Apps, you can set the [maximum number of replicas](/azure/container-apps/scale-app#scale-definition), which is honored as long as there's enough cores quota available.
The timeout duration for functions in a function app is defined by the `functionTimeout` property in the [host.json](../articles/azure-functions/functions-host-json.md#functiontimeout) 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. For more information, see [Improve Azure Functions performance and reliability](../articles/azure-functions/performance-reliability.md#make-sure-background-tasks-complete).
12
+
The timeout duration for functions in a function app is defined by the `functionTimeout` property in the [host.json](../articles/azure-functions/functions-host-json.md#functiontimeout) 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](../articles/azure-functions/functions-best-practices.md#write-robust-functions). For more information, see [Improve Azure Functions performance and reliability](../articles/azure-functions/performance-reliability.md#make-sure-background-tasks-complete).
13
13
14
14
The following table shows the default and maximum values (in minutes) for specific plans:
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](../articles/app-service/faq-availability-performance-application-issues.yml#why-does-my-request-time-out-after-230-seconds-). For longer processing times, consider using the [Durable Functions async pattern](../articles/azure-functions/durable/durable-functions-overview.md#async-http) or [defer the actual work and return an immediate response](../articles/azure-functions/performance-reliability.md#avoid-long-running-functions).
25
-
2.The default timeout for version 1.x of the Functions runtime is _unlimited_.
26
-
3.Guaranteed for up to 60 minutes. [OS and runtime patching](../articles/app-service/overview-patch-os-runtime.md), vulnerability patching, and [scale in behaviors](../articles/azure-functions/event-driven-scaling.md#scale-in-behaviors) can still cancel function executions so [ensure to write robust functions](../articles/azure-functions/functions-best-practices.md#write-robust-functions).
27
-
4.In a Flex Consumption plan, the host doesn't enforce an execution time limit. However, there are currently no guarantees because the platform might need to terminate your instances during scale-in, deployments, or to apply updates.
24
+
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](../articles/app-service/faq-availability-performance-application-issues.yml#why-does-my-request-time-out-after-230-seconds-). For longer processing times, consider using the [Durable Functions async pattern](../articles/azure-functions/durable/durable-functions-overview.md#async-http) or [defer the actual work and return an immediate response](../articles/azure-functions/performance-reliability.md#avoid-long-running-functions).
25
+
2.There is no maximum execution timeout duration enforced. However, the grace period given to a function execution is 60 minutes [during scale in](../articles/azure-functions/event-driven-scaling.md#scale-in-behaviors) for the Flex Consumption and Premium plans, and a grace period of 10 minutes is given during platform updates.
26
+
3.Requires the App Service plan be set to [Always On](/azure/azure-functions/dedicated-plan#always-on). A grace period of 10 minutes is given during platform updates.
27
+
4.The default timeout for version 1.x of the Functions host runtime is _unbounded_.
28
28
5. When the [minimum number of replicas](../articles/container-apps/scale-app.md#scale-definition) is set to zero, the default timeout depends on the specific triggers used in the app.
0 commit comments