All Products
Search
Document Center

Function Compute:Quotas and limits

Last Updated:Feb 07, 2025

This topic describes how to manage quotas for Function Compute resources. It also outlines the usage limits of various Function Compute resources, including service resources, function execution resources, triggers, layers, regions, and images.

Important

This information is particularly useful for new users who do not have a clear understanding of function principles, helping them avoid unexpected costs caused by incorrect configurations or code errors, such as recursive invocations and infinite loops.

Even with resource limits in place, unexpected costs can still arise from the improper use of provisioned instances. For more information, see Instance modes.

  • Quotas

    You can view the quotas for Function Compute resources in the Quota Center console. If the default quotas do not meet your business requirements, you can apply for a quota adjustment in the Quota Center console.

    Important
    • However, Quota Center only allows applications for quota adjustments within a certain range. 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.

    • It is essential to provide a thorough explanation of your reasons and submit relevant business information when you apply for a quota adjustment. Failure to do so may result in automatic rejection of the application, which hinders the efficiency of the process.

  • Limits

    Function Compute imposes limits on specific resources. If the existing resources do not meet your business requirements and the corresponding limits are adjustable, you can submit a ticket to request an adjustment. Alternatively, you can join the DingTalk group (group ID: 64970014484) to contact us directly for assistance.

Quotas

Function Compute is integrated with Alibaba Cloud Quota Center. You can view and manage the following quotas for Function Compute resources in the Quota Center console. For more information about Quota Center, see What is Quota Center?

Quota name

Description

Default value

upper limit of concurrent instances

The maximum number of instances that can be created in a region.

100 (The actual value displayed in the Quota Center console prevails.)

limit of gpu card number

Note

GPU-accelerated Function Compute 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

fc_quota_account_scaling_rate_per_sec

The maximum number of instances that can be delivered per second.

5

  1. Log on to the Quota Center console.

  2. In the left-side navigation pane, choose Products > General Quotas.

  3. On the Products with General Quotas page, select Elastic Compute from the Category drop-down list and then click Function Compute.

  4. On the General Quotas page, perform the following operations as needed:

    • View quotas: You can view the description and total quota for each quota item.

    • Apply for a quota adjustment: If an adjustable quota does not meet your business requirements, click Apply in the Actions column to apply for a quota adjustment. For more information, see Submit an application to increase a quota.

    • View application records: You can click Application Records in the Actions column to view the application records of a quota item.

Limits

Limits on service resources

Item

Limit

Adjustable or not

Functions per service

50

Yes

File Storage NAS (NAS) mount targets per service

5

No

Object Storage Service (OSS) mount targets per service

5

No

Limits on function execution resources

Item

Limit for CPU instances

Limit for GPU-accelerated instances

Adjustable or not

Temporary disk space

10 GB

60 GB

No

File descriptors

100,000

100,000

No

Total processes and threads

1,024

1,024

No

Memory for a function

32 GB

32 GB

No

Function execution duration

86,400s

86,400s

No

Execution duration for an Initializer hook

300s

300s

No

Execution duration for a PreFreeze hook

90s

90s

Yes

Execution duration for a PreStop hook

90s

90s

Yes

Request payload size of a synchronous invocation

32 MB

32 MB

No

Request payload size of an asynchronous invocation

128 KB

128 KB

No

Size of a code package (Base64-encoded ZIP file uploaded using an SDK or API)

100 MB

N/A

Yes

Size of a code package (ZIP/JAR file uploaded using the Function Compute console, a developer tool, or OSS)

500 MB

N/A

Yes

Throughput

1 Gbit/s to 5 Gbit/s

1 Gbit/s to 5 Gbit/s

No

Size of a log entry

32 KB

32 KB

No

Description of the size limits on code packages

When you create or update a function in Function Compute, you need to upload a code package. The limits on the sizes of code packages vary based on the upload method.

  • Code packages uploaded through SDKs or API operations

    The size of a code package uploaded using an SDK cannot exceed 100 MB. ZIP files uploaded through SDKs must be Base64-encoded. The encoding process 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.

  • Code packages uploaded by using the Function Compute console, developer tools, or OSS

    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.

Limits on triggers

Item

Limit

Adjustable or not

Triggers per function

50

Yes

Number of native OSS triggers that can be associated with a bucket

10

No

Note

You can associate a maximum of 10 native OSS triggers with a bucket. If this limit does not meet your business requirements, you can use EventBridge-based OSS triggers. You can create up to 50 EventBridge-based OSS triggers. In addition, you can apply for an increased number of event rules under a single bus on the General Quotas page to associate even more OSS triggers with a bucket.

Limits on layers

Item

Limit for CPU instances

Limit for GPU-accelerated instances

Adjustable or not

Size of a layer

500 MB

500 MB

Yes

Number of layer versions

100

100

No

Number of layers for a single function

5

5

Yes

Total size of layers for a single function

2 GB

2 GB

Yes

Limits on resources in a region within an account

Item

Limit

Adjustable or not

Number of requests that can be concurrently processed by an instance

1 to 200

No

Limits on the sizes of instance images

Instance type

Limit

Adjustable or not

CPU instance

10 GB after compression (approximately 20 GB before compression for a Docker image)

Yes

GPU-accelerated instance

15 GB after compression (approximately 28 GB before compression for a Docker image)

Yes

Limits on accessing other Alibaba Cloud services or resources

If Function Compute in your region is enabled to access resources in virtual private clouds (VPCs), the following network limits apply when your function calls other Alibaba Cloud services and resources:

  • The function cannot access resources, such as web services and file systems, on an Elastic Compute Service (ECS) instance in the classic network by using the internal IP address of the instance. Instead, it must use the public IP address of the instance to access the resources, or migrate the resources to a VPC.

  • Similarly, the function cannot access an ApsaraDB RDS instance in the classic network by using the internal IP address of the instance. Instead, it must use the public IP address of the instance, or migrate the instance to a VPC.

  • In addition, the function cannot access an Alibaba Cloud service by using its internal endpoint. Instead, it must use either a VPC endpoint or a public endpoint provided by the Alibaba Cloud service.