This topic describes the limits of Function Compute on quotas, service resources, function runtime resources, triggers, layers, regions, and image sizes.
This topic helps new users who do not have a clear understanding of function principles avoid unexpected costs caused by incorrect configurations or code errors, such as recursive invocations and infinite loops.
Even with resource limits in place, unexpected cost surges may still occur due to improper use of provisioned instances. For information about how to properly use instance modes, see Instance modes.
You can view the quotas of Function Compute in the Quota Center console. If the default quotas do not meet your business requirements, you can apply for quota adjustments in the Quota Center console.
ImportantThe Quota Center allows you to Apply For Quotas only within a specific range. The specific range for Quota Applications is subject to the Quota Center. For quotas that exceed this range, you can submit a ticket to request additional adjustments. When you attempt to raise the quota beyond the upper limit in the Quota Center console, you will be prompted to use the ticketing process instead.
To improve the efficiency of quota applications, you must provide a detailed explanation when you Apply For Quotas. Follow the guidance in the Application Reason field to provide relevant business information. Otherwise, your application will be rejected by default.
Function Compute imposes limits on specific resources. If the existing resources do not meet your business requirements and the resource limit in the table is marked as Supported for adjustment, you can contact us by submitting a ticket or joining our DingTalk user group (Group ID: 64970014484).
Quota management
Function Compute has been integrated with Alibaba Cloud Quota Center. You can view the quotas of 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 quotas of Function Compute.
Quota name | Description | Default limit |
Instance limit | The maximum number of instances that can be created in a region | 100 (The actual value displayed in the Quota Center console prevails.) |
GPU card limit Note GPU-accelerated instances include those accelerated by using GPUs of the Tesla and Ada series. | The maximum number of physical GPUs that can be used in a region | 10 |
CPU image size limit | The maximum size of an image after compression for non-GPU-accelerated instance deployment | 10GB |
GPU image size limit | The maximum size of an image after compression for GPU-accelerated instance deployment | 15GB |
Maximum number of layers per function | - | 5 |
Maximum number of triggers per function | - | 50 |
Code size limit | The maximum size of a code package (ZIP/JAR file) uploaded using the Function Compute console, a developer tool, or Object Storage Service (OSS) | 500MB |
Code packages in the following regions cannot exceed 500 MB in size: China (Hangzhou), China (Shanghai), China (Shenzhen), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hong Kong), Singapore, Japan (Tokyo), US (Virginia), and Germany (Frankfurt). In other regions, the size of a code package cannot exceed 100 MB.
Log on to the Quota Center console.
In the left-side navigation pane, choose Products > General Quotas.
On the General Quotas page, select Elastic Computing from the Product Category drop-down list, and click Function Compute.
On the General Quotas page, you can perform the following operations as needed:
View quotas: You can view the description and total quota of each quota item.
Apply for quotas: If the existing quotas do not meet your business requirements and the quotas can be adjusted, you can click Apply in the Actions column. For more information, see Create a quota increase application.
View application history: Click Application History in the Actions column to view the application history of the quota item.
Limits
Function Compute imposes limits on specific resources. If the existing resources do not meet your business requirements and the resource limit in the table is marked as supported for adjustment, you can contact us by submitting a ticket or joining our DingTalk user group (Group ID: 64970014484).
Service resource limits
Limit item | Resource limit | Adjustable |
Functions per service | 50 | Supported |
File Storage NAS (NAS) mount targets per service | 5 | Not supported |
OSS mount targets per service | 5 | Not supported |
Function runtime resource limits
Limit item | Resource limit (CPU instances) | Resource limit (GPU instances) | Adjustable |
Temporary disk space | 10 GB | 60 GB | Not supported |
File descriptors | 100000 | 100000 | Not supported |
Total processes and threads | 1024 | 1024 | Not supported |
Memory for a function | 32 GB | 32 GB | Not supported |
Function execution duration | 86400s | 86400s | Not supported |
Duration for which an Initializer hook can be executed | 300s | 300s | Not supported |
Execution duration for a PreFreeze hook | 90s | 90s | Supported |
Execution duration for a PreStop hook | 90s | 90s | Supported |
Request payload size of a synchronous function invocation | 32 MB | 32 MB | Not supported |
Request payload size of an asynchronous function invocation | 128 KB | 128 KB | Not supported |
Bandwidth | 1 Gbit/s to 5 Gbit/s | 1 Gbit/s to 5 Gbit/s | Not supported |
Size of a log entry | 32 KB | 32 KB | Not supported |
Size of a code package (Base64-encoded ZIP file uploaded using an SDK or API) | 100 MB | N/A | Supported |
ZIP files uploaded through SDKs must be Base64-encoded, which increases the sizes of the original code packages. In addition to the code packages, the request bodies that are used to create and update functions also include other components such as function configurations. Make sure that the combined size of the Base64-encoded code package and all other content in the request body does not exceed 100 MB.
Trigger limits
Resource item | Resource limit | Adjustable |
Number of native OSS triggers that can be associated with a bucket | 10 | Not supported |
If the maximum number of native OSS triggers per bucket cannot meet your requirements, you can use OSS triggers of the EventBridge type. Each bucket supports up to 50 triggers. You can also apply to increase the Number Of Event Rules Per Event Bus quota in EventBridge to further increase the number of triggers that can be created for a bucket.
Instance delivery speed
Resource item | Resource limit | Adjustable |
Number of instances that can be delivered per minute | 300 | Supported |
Layer limits
Limit item | Resource limit (CPU instances) | Resource limit (GPU instances) | Adjustable |
Size of a layer | 500 MB | 500 MB | Supported |
Number of layer versions | 100 | 100 | Not supported |
Total size of layers of a single function | 2 GB | 2 GB | Supported |
Resource limits for a single account in a region
Resource item | Resource limit | Adjustable |
Number of requests that can be concurrently processed by an instance | 1~200 | Not supported |
Limits on Function Compute accessing other Alibaba Cloud services or resources
If Function Compute in your region has the feature of accessing resources in a VPC enabled, your functions are subject to the following network limits when they call other Alibaba Cloud services or access resources.
You cannot access resources, such as web services and file systems, on an Elastic Compute Service (ECS) instance by using the internal IP address of the instance in the classic network. You must use the public IP address to access the resources or migrate the resources to a VPC.
You cannot use the internal IP address in the classic network to access an ApsaraDB RDS instance. You must use the public IP address or migrate the ApsaraDB RDS instance to a VPC.
You cannot access an Alibaba Cloud service by using its internal endpoints. You must use a VPC endpoint or a public endpoint that is provided by the service.
Compute node limits for a single account in each region
The scheduling service provides logical cores and memory compute nodes for users. The following table describes the compute node limits for each region.
The scheduling service provides burst capabilities for half of the total compute node limits through pooling. When the pooled resources are exhausted, the scheduling service scales out at a specific speed. When the quota is exceeded, throttling errors occur. For example, if you need 600 vCPUs and 1,200 GB of memory, the first 300 vCPUs and 600 GB of memory are quickly scaled out through pooling, and the remaining 300 vCPUs and 600 GB of memory are scaled out at the specified speed.
Region | CPU (vCPU) | Memory (GB) | Scale-out speed | Adjustable |
China (Hangzhou) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute | Supported |
China (Shanghai) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute | Supported |
China (Beijing) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute | Supported |
China (Zhangjiakou) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute | Supported |
China (Shenzhen) | 600 | 1200 | 360 vCPUs/minute, 720 GB/minute | Supported |
China (Hong Kong) | 300 | 600 | 180 vCPUs/minute, 360 GB/minute | Supported |
Singapore | 300 | 600 | 180 vCPUs/minute, 360 GB/minute | Supported |
US (Virginia) | 300 | 600 | 180 vCPUs/minute, 360 GB/minute | Supported |
China (Qingdao) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
China (Hohhot) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
China (Chengdu) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
Japan (Tokyo) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
Germany (Frankfurt) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
Malaysia (Kuala Lumpur) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
Indonesia (Jakarta) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
US (Silicon Valley) | 100 | 200 | 60 vCPUs/minute, 120 GB/minute | Supported |
China (Ulanqab) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute | Supported |
Thailand (Bangkok) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute | Supported |
UK (London) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute | Supported |
South Korea (Seoul) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute | Supported |
SAU (Riyadh - Partner Region) | 50 | 100 | 30 vCPUs/minute, 60 GB/minute | Supported |