Function Compute limits resource usage in areas such as function quotas, runtime resources, triggers, layers, regions, and image sizes. Understanding these limits helps developers, especially those new to the product, keep costs controllable when misconfiguration or code errors such as recursive invocations and infinite loops occur.
-
Some Function Compute resource usage is integrated with Quota Center. Go to the Quota Center console to view the Function Compute quota values and apply for quota adjustments based on your business needs.
Important-
By default, Quota Center allows you to apply for an increase within a certain quota range. Some quotas that exceed the specified range can be further increased by submitting a ticket. The actual quota values are subject to Quota Center.
-
To improve the efficiency of quota applications, you must fully explain your reason when you apply for a quota and provide the business-related information requested by the guidance text in Reason. Otherwise, the application is rejected.
-
-
For resource usage items that are not integrated with Quota Center, if the existing resource quota cannot meet your business needs, first check the corresponding table in Limits to confirm that the item is adjustable. Then, apply by submitting a ticket or joining the DingTalk user group (group ID: 64970014484).
Manage quotas
Function Compute is integrated with Alibaba Cloud Quota Center. Go to the Quota Center console to view the Function Compute quota values. For more information about Quota Center, see What is Quota Center?.
The Quota Center console lets you 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 Quota Center) |
|
Maximum CPU image size |
The maximum size of the compressed image that is supported when you deploy a non-GPU function. |
10 GB |
|
Maximum GPU image size |
The maximum size of the compressed image that is supported when you deploy a GPU function. |
30 GB |
|
Maximum number of layers per function |
The maximum number of layers that can be attached to a single function. |
5 |
|
Maximum number of triggers per function |
The maximum number of triggers that can be created for a single function. |
50 |
|
Limit on the code deployment package size |
The limit on the size of the code package (compressed as a ZIP or JAR file) that is uploaded through the console or developer tools, or whose package location is specified in OSS. |
500 MB in the regions listed below, 100 MB in other regions |
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, the limit on the code deployment package size is increased to 500 MB. In other regions, the limit is 100 MB.
-
Log on to Quota Center .
-
In the left-side navigation pane, choose .
-
On the Products with General Quotas page, in the Product Category drop-down list, select Elastic Computing, and click Function Compute.
-
On the General Quotas page, perform the following operations:
-
View quotas: view the description and quota value of each quota item.
-
Apply for a quota: if the existing quota cannot meet your business needs and the quota is adjustable, go to the Actions column and click Apply. For more information, see Request a quota increase.
-
View application history: in the Actions column, click Application Records to view the application history of the quota item.
-
Limits
The following limits apply to Function Compute resources that are not integrated with Quota Center. If the existing resources cannot meet your business needs and you have confirmed in the table that the upper limit of the corresponding resource item is adjustable, submit a ticket or join the DingTalk user group (group ID: 64970014484 ) to contact technical support.
Function resource limits
|
Limit item |
Resource limit |
Adjustable |
|
Maximum number of NAS mount targets that can be configured for a single function |
5 |
No |
|
Maximum number of OSS mount targets that can be configured for a single function |
5 |
No |
|
Instance concurrency |
1 to 200 |
No |
Function runtime resource limits
|
Limit item |
Resource limit (CPU instance) |
Resource limit (GPU instance) |
Adjustable |
|
Temporary disk space |
10 GB |
60 GB |
No |
|
File descriptors |
100,000 |
100,000 |
No |
|
Total number of processes and threads |
1024 |
1024 |
No |
|
Maximum memory that a function can request |
32 GB |
32 GB |
No |
|
Maximum function execution duration |
86,400 s |
86,400 s |
No |
|
Maximum Initializer execution duration |
300 s |
300 s |
No |
|
Maximum PreStop execution duration |
90 s |
90 s |
Yes |
|
Payload size of the request body for a synchronous function invocation |
32 MB |
32 MB |
No |
|
Payload size of the request body for an asynchronous function invocation |
128 KB |
128 KB |
Yes. The limit can be increased to a maximum of 256 KB. |
|
Bandwidth |
1 Gbit/s to 5 Gbit/s |
1 Gbit/s to 5 Gbit/s |
No |
|
Size of a single log entry |
32 KB |
32 KB |
No |
|
Size of the code deployment package (uploaded through the SDK or API, compressed as a ZIP file, and Base64-encoded) |
100 MB |
Not applicable |
Yes |
In the preceding table, the ZIP package that is uploaded through the SDK must be Base64-encoded, and the encoding increases the size of the original code package. In addition, when you create or update a function, the request body contains other content such as the function configuration besides the code package. Therefore, make sure that the total size of the Base64-encoded code package and the other content in the request body is less than 100 MB.
Instance delivery rate
|
Resource item |
Resource limit |
Adjustable |
|
Instance delivery rate |
300 per minute |
Yes |
Trigger limits
|
Resource item |
Resource limit |
Adjustable |
|
Maximum number of native OSS triggers that can be created for a single bucket |
10 |
No |
If the maximum number of native OSS triggers that can be created for a single bucket cannot meet your requirements, use OSS triggers of the EventBridge type, which allow 50 triggers to be created for a single bucket. As an alternative, apply to EventBridge for an increase in the Number of Event Rules per Bus quota to further increase the number of triggers that a single bucket supports.
Layer limits
|
Limit item |
Resource limit (CPU instance) |
Resource limit (GPU instance) |
Adjustable |
|
Layer size |
500 MB |
500 MB |
Yes |
|
Number of layer versions |
100 |
100 |
No |
|
Total size of all layers of a single function |
2 GB |
2 GB |
Yes |
Resource limits of a single account in a single region
The "Total GPU card limit" quota includes the "GPU card limit" quota, which counts the number of cards occupied by instances that are elastically created in response to requests.
|
Resource item |
Card type |
Default limit |
Adjustable |
|
Total GPU card limit |
Tesla series |
10 cards |
Yes |
|
Ada.1 series |
3 cards |
||
|
Ampere series |
3 cards |
||
|
Other GPU card types |
0 cards |
||
|
GPU card limit (the number of cards that are occupied by instances elastically created in response to requests) |
Tesla series |
3 cards |
|
|
Ada.1 series |
1 card |
||
|
Ampere series |
3 cards |
||
|
Other GPU card types |
0 cards |
Limits on Function Compute access to other cloud services or cloud resources
If the feature that allows Function Compute to access resources in a VPC is enabled in your region, the following network limits apply when your functions invoke other cloud services or cloud resources.
-
You cannot use the internal IP address of an ECS instance in the classic network to access the resources on that server, such as web services or file systems. You must use a public IP address to access them, or migrate the resources on the server to a VPC.
-
You cannot use the internal IP address of an RDS instance in the classic network to access RDS. You must use its public IP address to access RDS, or migrate RDS to a VPC.
-
You cannot use the internal endpoint provided by a cloud service to access the cloud service. You must use the VPC endpoint or the public endpoint provided by the cloud service to access it.
Compute node limits of a single account in each region
The scheduling service provides users with compute nodes of logical cores and memory. The compute node limits in each region are listed in the following table.
Pooling provides a burst capacity of cores and memory equal to half of the total compute node limit. When the pooled resources are exhausted, the scheduling service scales out at a certain scaling rate, and throttling errors occur when the limit is exceeded. For example, if you need 600 vCPUs and 1200 GB of memory, the first 300 vCPUs and 600 GB of memory are scaled out quickly through pooling. The remaining 300 vCPUs and 600 GB of memory are scaled out at the specified scaling rate.
Relationship between compute node limits, function specifications, and the number of function instances
Take the China (Hangzhou) region as an example. The maximum number of instances is 300. Different function instance specifications use different total amounts of vCPUs and memory, as described below.
-
Assume that the function specification is 1 vCPU and 1024 MB (1 GB) of memory. When the maximum number of instances is used, the total vCPU usage is 300 vCPUs and the total memory usage is 300 GB. The 300 vCPUs and 300 GB of memory do not exceed the limit of 600 vCPUs and 1200 GB in the current region, so 300 instances can be created.
-
Assume that the function specification is 16 vCPUs and 32,768 MB (32 GB) of memory. When the maximum number of instances is used, the total vCPU usage is 4800 vCPUs and the total memory usage is 9600 GB. The 4800 vCPUs and 9600 GB already exceed the limit of 600 vCPUs and 1200 GB in the current region. Therefore, 300 instances cannot actually be created, and you must apply for a higher compute node limit in this case.
|
Region |
CPU (vCPU) |
Memory (GB) |
Scaling rate |
|
China (Hangzhou) |
600 |
1200 |
360 vCPUs/minute and 720 GB/minute |
|
China (Shanghai) |
600 |
1200 |
360 vCPUs/minute and 720 GB/minute |
|
China (Beijing) |
600 |
1200 |
360 vCPUs/minute and 720 GB/minute |
|
China (Zhangjiakou) |
600 |
1200 |
360 vCPUs/minute and 720 GB/minute |
|
China (Shenzhen) |
600 |
1200 |
360 vCPUs/minute and 720 GB/minute |
|
China (Hong Kong) |
300 |
600 |
180 vCPUs/minute and 360 GB/minute |
|
Singapore |
300 |
600 |
180 vCPUs/minute and 360 GB/minute |
|
US (Virginia) |
300 |
600 |
180 vCPUs/minute and 360 GB/minute |
|
China (Qingdao) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
China (Hohhot) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
China (Chengdu) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
Japan (Tokyo) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
Germany (Frankfurt) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
Malaysia (Kuala Lumpur) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
Indonesia (Jakarta) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
US (Silicon Valley) |
100 |
200 |
60 vCPUs/minute and 120 GB/minute |
|
China (Ulanqab) |
50 |
100 |
30 vCPUs/minute and 60 GB/minute |
|
Thailand (Bangkok) |
50 |
100 |
30 vCPUs/minute and 60 GB/minute |
|
UK (London) |
50 |
100 |
30 vCPUs/minute and 60 GB/minute |
|
South Korea (Seoul) |
50 |
100 |
30 vCPUs/minute and 60 GB/minute |
|
Saudi Arabia (Riyadh) |
50 |
100 |
30 vCPUs/minute and 60 GB/minute |