This topic describes the limits on resources in Function Compute.

Notice

This topic helps new users that do not have a clear understanding of the function principles avoid uncontrollable costs caused by incorrect configurations or code errors, such as cyclical invocations and infinite loops. If you are familiar with the function principles and you want to increase the resource limits, submit a ticket.

If the provisioned mode is not properly used under the resource limits, extra costs may abruptly increase. For more information, see Instance modes.

Resource limits for services

Item Upper limit
Functions per service 50
Triggers per function 10

Resource limits for function execution

Item Upper limit (elastic instances) Upper limit (performance instances)
Temporary disk space (the /tmp directory) 512 MB 10 GB
File descriptor 100000 100000
Total processes and threads 1024 1024
Memory used to execute a function 3 GB 16 GB
Duration for which a function can be executed 86400s 86400s
Duration for which an Initializer hook can be executed 300s 300s
Request payload size of a synchronous function invocation 16 MB 16 MB
Request payload size of an asynchronous function invocation 128 KB 128 KB
Code package size (ZIP or JAR file) 500 MB 500 MB
Source code size 500 MB 10 GB
Bandwidth 1 Gbit/s 1 Gbit/s to 5 Gbit/s
Size of a log 32 KB 32 KB
Note In the following regions, the size of a code deployment package can be up to 500 MB. The size of a code deployment package in other regions cannot exceed 100 MB.
  • China (Hangzhou)
  • China (Shanghai)
  • China (Shenzhen)
  • China (Beijing)
  • China (Zhangjiakou)
  • China (Hohhot)
  • China (Hong Kong)
  • Singapore (Singapore)
  • Japan (Tokyo)
  • US (Virginia)
  • Germany (Frankfurt)

Resource limits for an account per region

Item Upper limit
Total size of deployment packages that can be uploaded 100 GB
On-demand instances 300
Note If you need more on-demand instances, Submit a ticket.
Number of requests that can be concurrently processed by a single instance 1 to 100

Limits on accessing other Alibaba Cloud services or resources

If the Function Compute service in your region is allowed to access resources in a virtual private cloud (VPC), the following network limits exist when a function accesses other Alibaba Cloud services or resources:

  • You cannot use the internal IP address of an Elastic Compute Service (ECS) instance in the classic network to access the resources, such as web services and file systems, on the ECS instance. 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.