Available in Classic and VPC
You might run into the following problems when using Cloud Functions: Find out causes and possible solutions.
Time limits error
The Time limits error occurs.
Cause
When there is a problem in the network setting (NAT Gateway, Network ACL, ACG, and so on), the Time limits error may occur.
Solution
Check NAT settings
- NAT Gateway setting is required for the action created in a private subnet to communicate externally. For how to set NAT Gateway, see NAT Gateway.
- You need to set NAT Gateway routing rules to the Route Table related to the private subnet where the action was created, for the destination of 0.0.0.0/0. For how to set Route Table, see Route Table.
Check NACL (Network ACL) setting of the subnet where Cloud Functions operates
If there are problems in NACL settings, Cloud Functions cannot communicate to external internet or certain services. In particular, check Inbound and Outbound rules to see if the external communications (for example, HTTP and HTTPS) are allowed.
For example, the external communications of actions may get blocked if the default deny rule is added as follows:
| Priority | Protocol | Access source | Allowed port | Notes |
|---|---|---|---|---|
| 200 | TCP | 0.0.0.0/0 | 1-65535 | default deny |
Check ACG settings
In order for Cloud Functions to access other resources in VPC (VM, Database, and so on), add cloudfunctions-vpc-<vpc_id> acg to the ACG Inbound access source of the applicable resource or add VPC or subnet range where the action was created. For more information, see Guides.
If the problem continues even after you check network-related settings, forward "date of occurrence, code content, action logs, and activationId" information to Customer Support of NAVER Cloud Platform.
VPC VM communication not available in VPC action
VPC VM communication is not available in a VPC action.
Cause
If the VM has multiple NICs (more than 1 public subnet) set up, the packet may be kernel dropped by rp_filter (Reverse Path Filter).
Solution
Set the static routes in the VM as follows:
ip route add <range of subnet associated with the action> via <VM's Private NIC Gateway IP>
The example of setting is as follows:
The subnetA range associated with the VPC subnet (private) connected to the action 10.0.10.0/24
Subnets connected to the VM:
Subnet(Public) subnetB (10.0.20.0/24)
Subnet(Private) subnetC (10.0.30.0/24)
VM NIC
eth0 ip 10.0.20.3 mask 255.255.255.0 g/w 10.0.20.1
eth1 ip 10.0.30.5 mask 255.255.255.0 g/w 10.0.30.1
ip route add 10.0.10.0/24 via 10.0.30.1
If you're still having trouble finding what you need, click on the feedback icon and send us your thoughts and requests. We'll use your feedback to improve this guide.