All Products
Search
Document Center

Function Compute:Configure a retry mechanism

Last Updated:Dec 10, 2024

This topic describes how to retry a function when the function fails to be invoked in synchronous or asynchronous mode.

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.

    Error type

    Server behavior

    Billed

    Solution

    HandledInvocationError and UnhandledInvocationError errors of Function Compute

    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 upper limit exceeded

    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.

    Internal error

    No

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

    Insufficient Function Compute resources

    No

Contact us if you encounter problems when using Function Compute.