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|
|The execution is successful.||-|
|The request event passed in by the event execution function is not of the JSON type.||Please make modifications as instructed in Introduction and InvokeFunction and try again.|
|The verification fails.||Your account does not have the permission to manipulate this function. Please make modifications as instructed in the authorization description in Permission Management Overview and try again.|
|The subnet ID in the network configuration of the function is exceptional.||Please check whether the network configuration of the function is correct and whether the subnet ID is valid.|
|The container exits.||Please check your image or bootstrap file to see whether it can be properly started locally.
If so, please 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`.
|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. Please adjust the request event size accordingly and try again.|
The size of response exceeds the upper limit (6MB)
|The size of function response exceeds the upper limit of 6 MB.||Please adjust it and try again.|
|The account balance is insufficient.||The SCF service is suspended because the Tencent Cloud account has overdue payments. Please top up and try again.|
|The container request rate is too high and exceeds the limit due to concurrency surges.||The default speed of elastic concurrency expansion 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.
User code exception caught
|A user code execution error occurs.||Please check the code error stack information in the invocation log provided by the SCF console, make modifications, and try again.|
|The account-level or region-level concurrency limit is reached.||
|Function execution is not completed after the execution timeout period elapses.||
|The memory limit is reached.||
|The function is not found.||
|The parameter passed in for `invoke` does not conform to the specification.||The parameter does not conform to the specification. Please modify it as instructed in Introduction and try again.|
|The function package is loaded incorrectly.||
|The function is exceptional or the SCF service is suspended.||
User preocess exit when running
|The user process exits accidentally.||Based on the error message, please find out the cause, fix the function code, and try again.|
|CAM authentication fails.||Please check whether the CAM authentication parameters for the function invoker are passed correctly. For more information, please see the authorization description in Permission Management Overview.|
|The specified version is not found.||The function version does not exist. Please check the function version and try again.|
|A user code execution error occurs.||Based on the error log on the console, please check the error stack of the code and see whether the code can be executed properly.|
|Image pull fails.||Please 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, please contact the smart customer service or submit a ticket.|
|Container start fails.||Container start fails. Please check whether your bootstrap file has been uploaded successfully and ensure that the invocation path is correct.
|Port listening fails.||The container initialization duration exceeds the initialization timeout period.
|Image pull times out.||It may be a timeout caused by a large image or network jitters. Please minimize the image or increase the initialization timeout period and try again. If the problem persists, please contact the smart customer service or submit a ticket.|
|The configured function memory exceeds 3,072 MB but there are no resources available in the region.|
|Container start times out.||The container start duration exceeds the initialization timeout period. Please minimize the code or increase the initialization timeout period and try again.|
|The function execution request is canceled.||
|Internal error.||Internal error. Please try again. If the problem persists, please contact the smart customer service or 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
For Python, Node.js, or PHP programming, use the FileName.FunctionName format, such as
.py, and for Node.js programming, the file name extension is
.js. For more information, please see "Execution Method" in Basic Concepts.
For Java programming, use the package.class::method format, such as
For the Custom Runtime environment, a non-fixed format can be used based on the custom programming language implementation.