This topic describes the key resource usage limits in Function Compute, including quotas for functions, runtimes, triggers, layers, regions, and images. These limits help developers, especially new users, prevent uncontrolled costs that can result from misconfigurations or code errors, such as recursive invocations or infinite loops.
Some Function Compute resources are managed in Quota Center. In the Quota Center console, you can view Function Compute quotas and request quota increases as needed.
ImportantBy default, Quota Center lets you request quota increases within a specific range. To request a quota increase beyond this range, you can submit a ticket. The actual quota range is displayed in Quota Center.
To process your quota increase request efficiently, provide a detailed business justification. Follow the instructions in the Reason field to supply this information. Otherwise, your request will be rejected.
For resources not managed in Quota Center, refer to the corresponding table in the Limits section to confirm whether the quota is adjustable. If the current quota is insufficient for your business needs, you can submit a ticket or join the DingTalk user group (ID: 64970014484) to request a quota increase.
Manage quotas
Function Compute is integrated with Alibaba Cloud Quota Center. You can view the quotas for Function Compute in the Quota Center console. For more information about Quota Center, see What is Quota Center?.
In the Quota Center console, you can manage the following Function Compute quotas.
Quota name | Description | Default limit | |
Maximum number of instances | The maximum number of instances in a single region | 300 (subject to the value in Quota Center) | |
Maximum size of a CPU image | The maximum size of a compressed image for a non-GPU function deployment | 10 GB | |
Maximum size of a GPU image | The maximum size of a compressed image for a GPU function deployment | 30 GB | |
Maximum number of layers for a single function | - | 5 | |
Maximum number of triggers for a single function | - | 50 | |
Limit on the size of a code package | The size limit for a code package (compressed into a ZIP or JAR file) that you upload using the console or a developer tool, or by specifying its location in OSS. | 500 MB | |
The limit on the size of a code package is increased to 500 MB in the China (Hangzhou), China (Shanghai), China (Shenzhen), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hong Kong), Singapore, Japan (Tokyo), US (Virginia), and Germany (Frankfurt) regions. In other regions, the limit is 100 MB.
Log on to the Quota Center console.
In the left navigation pane, choose Product List > General Quota.
On the General Quota Products page, select Elastic Computing from the Product Category drop-down list, and then click Function Compute.
On the General Quotas page, you can perform the following operations as needed:
View quotas: View the description and value for each quota.
Request a quota increase: If the current quota is insufficient and the quota is adjustable, click Apply in the Actions column. For more information, see Create an application to increase a quota.
To view the application history for a quota, click Application History in the Actions column.
Limits
This section describes the limits on Function Compute resources not managed in Quota Center. If the current quota is insufficient and the table indicates that the quota is adjustable, you can submit a ticket or join the DingTalk user group (ID: 64970014484) to request a quota increase.
Function resource limits
Limitations | Limit | Is adjustment supported? |
Maximum number of NAS mount targets for a single function | 5 | This is not supported. |
Maximum number of OSS mount targets for a single function | 5 | Not supported. |
Concurrency per instance | 1 to 200 | Unsupported |
Function runtime resource limits
Limits | Limit (CPU instances) | Limit (GPU-accelerated instances) | Is adjustment supported? |
Temporary disk space | 10 GB | 60 GB | Not supported. |
File descriptors | 100000 | 100000 | Not supported. |
Total number of processes and threads | 1024 | 1024 | Not supported. |
Maximum memory that a function can request | 32 GB | 32 GB | Not supported |
Maximum runtime of a function | 86400s | 86400s | Not supported. |
Maximum runtime of an Initializer hook | 300s | 300s | Not supported. |
Maximum runtime of a PreStop hook | 90s | 90s | Support |
Payload size of a synchronous invocation request | 32 MB | 32 MB | Not supported |
Payload size of an asynchronous invocation request | 128 KB | 128 KB | Supports up to 256 KB. |
Bandwidth | 1 Gbit/s to 5 Gbit/s | 1 Gbit/s to 5 Gbit/s | Not supported. |
Size of a single log entry | 32 KB | 32 KB | Not supported |
Size of a code package (uploaded using an SDK or API, compressed into a ZIP file, and Base64-encoded) | 100 MB | Not applicable | Support |
A ZIP package that you upload using an SDK must be Base64-encoded. This encoding process increases the size of the original package. When you create or update a function, the request body contains the code package and other content, such as the function configuration. Therefore, you must ensure that the total size of the Base64-encoded code package and other content in the request body is less than 100 MB.
Instance delivery speed
Item | Limit | Are adjustments supported? |
Instance delivery speed | 300 per minute | Supported |
Trigger limits
Resource Item | Limit | Is adjustment supported? |
Maximum number of native OSS triggers that can be created for a single bucket | 10 | Not supported |
If the limit on the number of native OSS triggers for a single bucket does not meet your requirements, you can use EventBridge-based OSS triggers. You can create up to 50 EventBridge-based OSS triggers for a single bucket. You can also request an increase in the Number of event rules for a single event bus quota in EventBridge to create more triggers for a single bucket.
Layer limits
Restrictions | Limit (CPU instances) | Limit (GPU-accelerated instances) | Can I make adjustments? |
Layer size | 500 MB | 500 MB | Support |
Number of layer versions | 100 | 100 | Not supported |
Total size of all layers for a single function | 2 GB | 2 GB | Support |
Resource limits for a single account in a region
The "Maximum number of GPUs for on-demand instances" is included in the "Maximum total number of GPUs".
Item | Default limit | Is adjustment supported? | |
Maximum total number of GPUs | Maximum number of Tesla GPUs | 10 GPU cards | Support |
Maximum number of Ada.1 GPUs | Three GPU cards | ||
Maximum number of Ampere GPUs | Three cards | ||
Other GPU types | 0 | ||
Maximum number of GPUs for on-demand instances | Maximum number of Tesla GPUs | 3 cards | |
Maximum number of Ada.1 GPUs | One card | ||
Maximum number of Ampere GPUs | Three cards | ||
Other GPU types | 0 | ||
Limits on accessing other Alibaba Cloud services or resources
If your region supports the Function Compute feature for VPC access, calls made from your functions to other Alibaba Cloud services or cloud resources are subject to the following network restrictions.
You cannot use the private IP address of an ECS instance in a classic network to access resources on the server, such as web services or file systems. Instead, you must use a public IP address to access the resources or migrate the resources to a VPC.
You cannot use the private IP address of an RDS instance in a classic network to access the RDS instance. Instead, you must use its public IP address to access the instance or migrate the RDS instance to a VPC.
You cannot use the private endpoint of an Alibaba Cloud service to access the service. Instead, you must use the VPC endpoint or public endpoint of the service.
Compute node limits for a single account in each region
The scheduling service provides compute nodes with logical cores and memory. The limits on compute nodes for each region are listed in the following table.
Resource pooling provides a burst capacity equivalent to half of the total vCPU and memory limits. After the pooled resources are exhausted, the scheduling service scales out additional resources at a specific rate. If you exceed the quota, a throttling error occurs. For example, if you require 600 vCPUs and 1,200 GB of memory, the first 300 vCPUs and 600 GB of memory are quickly provisioned from the resource pool. The remaining 300 vCPUs and 600 GB of memory are provisioned at the specified scale-out rate.
Region | CPU (vCPU) | Memory (GB) | Scale-out speed |
China (Hangzhou) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute |
China (Shanghai) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute |
China (Beijing) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute |
China (Zhangjiakou) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute |
China (Shenzhen) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute |
China (Hong Kong) | 300 | 600 | 180 vCPUs/minute, 360 GB/minute |
Singapore | 300 | 600 | 180 vCPUs/minute, 360 GB/minute |
US (Virginia) | 300 | 600 | 180 vCPUs/minute, 360 GB/minute |
China (Qingdao) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
China (Hohhot) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
China (Chengdu) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
Japan (Tokyo) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
Germany (Frankfurt) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
Malaysia (Kuala Lumpur) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
Indonesia (Jakarta) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
US (Silicon Valley) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute |
China (Ulanqab) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute |
Thailand (Bangkok) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute |
UK (London) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute |
South Korea (Seoul) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute |
SAU (Riyadh - Partner Region) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute |