This topic describes limits on usage of Function Compute resources, such as service resources, function resources, triggers, layers, regions, image sizes, and the number of GPU cards.
This topic helps new users have a clear understanding of function principles and prevent unexpected costs incurred due to incorrect configurations or code errors, such as cyclical invocations and infinite loops. If you want to increase the limits on resources, join the DingTalk group 11721331 for technical support. Only resources whose quota is adjustable, as described in the following tables, can be adjusted.
If provisioned function instances are not properly used under the resource limits, unexpected costs may surge. For more information, see Instance types and usage modes.
Resource limits on services
Item | Limit | Adjustable |
Functions per service | 50 | Yes |
Apsara file storage NAS (NAS) mount targets per service | 5 | No |
Object Storage Service (OSS) mount targets per service | 5 | No |
Resource limits on function execution
Item | Limit (elastic instances) | Limit (GPU-accelerated instances) | Adjustable |
Temporary disk space | 10 GB | 10 GB | No |
File descriptor | 100000 | 100000 | No |
Total processes and threads | 1024 | 1024 | No |
Memory for a function | 32 GB | 32 GB | No |
Function execution duration | 86400s | 86400s | No |
Execution duration for an Initializer hook | 300s | 300s | No |
Maximum running time of a PreFreeze hook | 90s | 90s | Supported |
Maximum running time of a PreStop hook | 90s | 90s | Supported |
Request payload size of a synchronous invocation | 32 MB | 32 MB | No |
Request payload size of an asynchronous invocation | 128 KB | 128 KB | No |
Code package size (ZIP or JAR file) | 500 MB | N/A | Yes |
Bandwidth | 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 |
Trigger limits
Item | Limit | Adjustable |
Triggers per function | 10 | Yes |
Number of native OSS triggers that can be created for a bucket | 10 | No |
Number of EventBridge-based OSS triggers that can be created for a bucket | 50 | Yes |
Limits on layers
Item | Limit (elastic instances) | Limit (GPU-accelerated instances) | Adjustable |
Layer size | 500 MB | 500 MB | Yes |
Layer versions | 100 | 100 | Yes |
Layers for a single function | 5 | 5 | Yes |
Total size of layers for a single function | 2 GB | 2 GB | Yes |
Limits on resources for an account per region
Item | Limit | Adjustable |
On-demand instances | 300 | Yes |
Concurrently-processed requests per instance | 1~200 | No |
Limits on sizes of instance images
Instance type | Limit | Adjustable |
CPU image size | 10 GB of compressed images (about 20 GB of uncompressed Docker images) | Yes |
GPU image size | 15 GB of compressed images (about 28 GB of uncompressed Docker images) | Yes |
Limits on GPUs
Item | Limit | Adjustable |
Physical GPUs per region Note GPU-accelerated instances in Function Compute can be configured with GPU cards of NVIDIA Tesla T4 or NVIDIA Ampere A10. | 30 | Yes |
Limits on accessing other Alibaba Cloud services or resources
If Function Compute in your region is allowed to access resources in virtual private clouds (VPCs), the following limits on networks apply when your functions call other Alibaba Cloud services and resources:
You cannot access the 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 of the instance 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 to access an ApsaraDB RDS instance 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 Alibaba Cloud service.