All Products
Search
Document Center

Function Compute:Error handling

Last Updated:Feb 02, 2024

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

Configure a retry mechanism

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

  • Failed synchronous invocation

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

  • Failed asynchronous invocation

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

    Cause

    HTTP status code

    Server behavior

    Billable

    Solution

    Function Compute error types are HandledInvocationError and UnhandledInvocationError. For more information about Function Compute error types, 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 about billing, see Billing overview.

    Troubleshoot your code.

    Execution concurrency exceeds the upper limit.

    429

    Function Compute retries the function for up to 5 hours in binary exponential backoff mode. Function Compute starts to retry a function 0.5 seconds after the function fails to be executed. The subsequent retries are performed at binary exponential back-off intervals, such as 1 second, 2 seconds, 4 seconds, and 8 seconds.

    No

    By default, the maximum number of on-demand instances allowed for your Alibaba Cloud account in a single region is 300. If you want to increase the upper limit, join the DingTalk group (ID: 11721331) to for technical support.

    An internal system error occurs.

    500

    Function Compute retries the function for up to 5 hours in binary exponential backoff mode. Function Compute starts to retry a function 0.5 seconds after the function fails to be executed. The subsequent retries are performed at binary exponential back-off intervals, such as 1 second, 2 seconds, 4 seconds, and 8 seconds.

    No

    Join the DingTalk group (ID: 11721331) for technical support.

    Function Compute resources are insufficient.

    503

    Function Compute retries the function for up to 5 hours in binary exponential backoff mode. Function Compute starts to retry a function 0.5 seconds after the function fails to be executed. The subsequent retries are performed at binary exponential back-off intervals, such as 1 second, 2 seconds, 4 seconds, and 8 seconds.

    No

    Join the DingTalk group (ID: 11721331) for technical support.

If issues occur during function invocation retries, contact us.