All Products
Search
Document Center

Function Compute:Configure a retry mechanism

Last Updated:Aug 04, 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 lists the situations in which Function Compute automatically retries.

    Error type

    Server behavior

    Billable

    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 about billing, see Billing overview.

    Troubleshoot your code.

    Execution concurrency upper limit exceeded

    Function Compute retries the execution for up to 5 hours in binary exponential back-off mode. If your function execution fails, retries start 0.5 seconds later. Subsequent retry intervals are calculated in binary exponential backoff mode. The wait intervals between retries double with each attempt, starting at 1 second, then 2 seconds, 4 seconds, 8 seconds, and so forth. This pattern continues for up to 5 hours.

    No

    By default, the maximum number of on-demand instances allowed for your Alibaba Cloud account in a single region is 300. If you need to increase this limit, join the DingTalk group 64970014484 for technical support.

    Internal error

    No

    Join the DingTalk group 64970014484 for technical support.

    Insufficient Function Compute resources

    No

If issues occur during function invocation retries, contact us.