This topic describes how to perform retries to complete a function call when a synchronous call or asynchronous call fails to be executed.

Retry mechanism

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

    You need to try again.

  • Asynchronous call failure
    The following table lists the cases where the Function Compute automatically retries.
    Failure cause HTTP status code Server behavior Billable Solution
    The Function Compute error types are HandledInvocationError and UnhandledInvocationError. For more information about Function Compute error types, see Troubleshooting. 200 By default, it retries three times, or retries based on the number of asynchronous settings. You are billed based on the number of calls. For more information about billing, see Billing. Troubleshoot your code yourself.
    The concurrent execution of the function exceeds the upper limit. 429 Retry execution for 5 hours in binary exponential backoff mode. If your function fails to be executed, retries will start after 0.5 seconds. The interval for subsequent retries is calculated in binary exponential backoff mode. That is, the retry interval is 1 second, 2 seconds, 4 seconds, and 8 seconds for continuous retries for 5 hours. No The default maximum number of pay-as-you-go instances in a single region due to an Alibaba Cloud account (master account) is 300. To increase this limit, submit a ticket.
    An internal system error occurs. 500 Retry execution for 5 hours in binary exponential backoff mode. If your function fails to be executed, retries will start after 0.5 seconds. The interval for subsequent retries is calculated in binary exponential backoff mode. That is, the retry interval is 1 second, 2 seconds, 4 seconds, and 8 seconds for continuous retries for 5 hours. No submit a ticket.
    Function Compute resources are insufficient. 503 Retry execution for 5 hours in binary exponential backoff mode. If your function fails to be executed, retries will start after 0.5 seconds. The interval for subsequent retries is calculated in binary exponential backoff mode. That is, the retry interval is 1 second, 2 seconds, 4 seconds, and 8 seconds for continuous retries for 5 hours. No submit a ticket.

If you encounter problems, you can contact Function Compute engineers.