If an error code is returned after the function is executed, you can find the cause and solution for the error code by referring to the following table.
Status Code and Status Message | Description | Solution |
---|---|---|
200 Success |
The execution is successful. | - |
400 InvalidParameterValue |
The request event passed in by the event execution function is not of the JSON type. | Make modifications as instructed in Introduction and InvokeFunction and try again. |
401 InvalidCredentials |
The verification fails. | Your account does not have the permission to manipulate this function. Make modifications as instructed in the authorization description in Permission Management Overview and try again. |
402 ServiceSuspended |
The service is temporarily suspended. | Your SCF service is temporarily suspended. You can refer to Service Resumption to make changes and try again later. |
404 InvalidSubnetID |
The subnet ID in the network configuration of the function is abnormal. | Check whether the network configuration of the function is correct and whether the subnet ID is valid. |
405 ContainerStateExited |
The container exits. | Check your image or bootstrap file to see whether it can be properly started locally. If so, check whether the use limits of SCF are followed; for example, RootFS is read-only and only `/tmp` is writable. Local debugging command: `docker run -itd --read-only -v /tmp:/tmp`. |
406 RequestTooLarge |
The `event` input parameter of the function, i.e., the request event size of the function, exceeds the quota limit. | The request event size exceeds the quota limit, which is 6 MB for sync request events or 128 KB for async ones. Adjust the request event size accordingly and try again. |
407 The size of response exceeds the upper limit (6MB) |
The size of function response exceeds the upper limit of 6 MB. | Adjust it and try again. |
410 InsufficientBalance |
The account balance is insufficient. | The SCF service is suspended because the Tencent Cloud account has overdue payments. Top up and try again. |
429 ResourceLimit |
The container request rate is too high and exceeds the limit due to concurrency surges. | The default upper speed of elastic concurrency expansion (function burst) for each account is 500 concurrent instances per region per minute. During a sudden concurrency surge, if there are not enough containers to carry the requests, a large number of container request actions will be triggered, and this message will be returned when the account limit is exceeded.
|
430 User code exception caught |
A user code execution error occurs. | Check the code error stack information in the invocation log provided by the SCF console, make modifications, and try again. |
432 ResourceLimitReached |
The account-level or region-level concurrency limit is reached. |
|
433 TimeLimitReached |
Function execution is not completed after the execution timeout period elapses. |
|
434 MemoryLimitReached |
The memory limit is reached. |
|
435 FunctionNotFound |
The function is not found. |
|
436 InvalidParameterValue |
The parameter passed in for `invoke` does not conform to the specification. | The parameter does not conform to the specification. Modify it as instructed in Introduction and try again. |
437 HandlerNotFound |
The function package is loaded incorrectly. |
|
438 FunctionStatusError |
The function is abnormal or the SCF service is suspended. |
|
439 User process exit when running |
The user process exits accidentally. |
|
441 UnauthorizedOperation |
CAM authentication fails. | Check whether the CAM authentication parameters for the function invoker are passed correctly. For more information, see the authorization description in Permission Management Overview. |
442 QualifierNotFound |
The specified version is not found. | The function version does not exist. Check the function version and try again. |
443 UserCodeError |
A user code execution error occurs. | Based on the error log on the console, check the error stack of the code and see whether the code can be executed properly. |
444 PullImageFailed |
Image pull fails. | Check the integrity and validity of the selected image and try again; for example, check whether it can be downloaded locally. If the problem persists, submit a ticket. |
445 ContainerInitError |
Container start fails. | Container start fails. Check whether your bootstrap file has been uploaded successfully and ensure that the invocation path is correct.
|
446 PortBindingFailed |
Port listening fails. | The container initialization duration exceeds the initialization timeout period.9000 . |
447 PullImageTimeOut |
Image pull times out. | It may be a timeout caused by a large image or network jitters. Minimize the image or increase the initialization timeout period and try again. If the problem persists, submit a ticket. |
449 InsufficientResources |
There are no resources available at the resource specification selected by this function in the specified region. | If the resource type is high-spec CPU or GPU, it can be used with the provisioned concurrency. If the problem persists, submit a ticket. |
450 InitContainerTimeout |
Container start times out. | The container start duration exceeds the initialization timeout period. Minimize the code or increase the initialization timeout period and try again. |
499 RequestCanceled |
The function execution request is canceled. |
|
500 InternalError |
An internal error occurs. | An internal error occurs. Try again later. If the problem persists, submit a ticket. |
The execution method specifies the starting file and function while invoking the cloud function as shown below:
For Go programming, use the FileName format, such as main
.
For Python, Node.js, or PHP programming, use the FileName.FunctionName format, such as index.main_handler
.
.py
, and for Node.js programming, the file name extension is .js
. For more information, see "Execution Method" in Basic Concepts. For Java programming, use the package.class::method format, such as example.Hello::mainHandler
.
For custom runtime, you can ignore the above patterns, and write the execution method in your custom language.
Was this page helpful?