All Products
Search
Document Center

Function Compute:Error handling

Last Updated:Dec 10, 2024

This topic describes the retry mechanism for functions upon failed synchronous or asynchronous invocations.

Retry mechanism

If a function fails to be executed, its invocation method determines whether Function Compute automatically retries the function.

  • Failed synchronous invocations

    Function Compute does not automatically retry the function. You can manually retry the function.

  • Failed asynchronous invocations

    The following table describes the situations in which Function Compute automatically retries the function.

    Failure cause

    HTTP status code

    Server behavior

    Billed

    Solution

    HandledInvocationError and UnhandledInvocationError errors of Function Compute occur. For more information about the error types in Function Compute, see Basics.

    200

    By default, Function Compute retries the function up to three times. You can change the number of retries based on your business requirements.

    Billed based on the number of invocations. For more information, see Billing overview.

    Troubleshoot your code.

    Execution concurrency exceeds the upper limit.

    429

    Function Compute retries the function execution for up to 5 hours in binary exponential backoff mode. If your function execution fails, retries start 0.5 seconds later. Subsequent retry intervals are calculated in binary exponential backoff mode, such as 1 second, 2 seconds, 4 seconds, and 8 seconds. The retries last up to 5 hours.

    No

    By default, each Alibaba Cloud account can run up to 100 instances in each region. The actual quota displayed on the General Quotas page in the Quota Center console prevails. You can increase the quota in the Quota Center console.

    An internal system error occurs.

    500

    Function Compute retries the function execution for up to 5 hours in binary exponential backoff mode. If your function execution fails, retries start 0.5 seconds later. Subsequent retry intervals are calculated in binary exponential backoff mode, such as 1 second, 2 seconds, 4 seconds, and 8 seconds. The retries last up to 5 hours.

    No

    Contact technical support in the DingTalk group (ID: 64970014484).

    Function Compute resources are insufficient.

    503

    Function Compute retries the function execution for up to 5 hours in binary exponential backoff mode. If your function execution fails, retries start 0.5 seconds later. Subsequent retry intervals are calculated in binary exponential backoff mode, such as 1 second, 2 seconds, 4 seconds, and 8 seconds. The retries last up to 5 hours.

    No

    Contact technical support in the DingTalk group (ID: 64970014484).

Contact us if you encounter problems when using Function Compute.