Function Compute handles invocation failures differently depending on whether the invocation is synchronous or asynchronous. For synchronous invocations, Function Compute does not retry automatically — retry logic is your responsibility. For asynchronous invocations, Function Compute retries automatically based on the failure type.
Retry mechanism
Synchronous invocations
Function Compute does not retry failed synchronous invocations. To retry, re-invoke the function from your code or client.
Asynchronous invocations
Function Compute retries automatically when an asynchronous invocation fails. The retry behavior depends on the failure type.
Function errors
HandledInvocationError and UnhandledInvocationError are triggered by errors in your function code or runtime. For more information, see Basics.
| HTTP status code | Retry behavior | Billed | Action |
|---|---|---|---|
| 200 | Retries up to 3 times by default. The number of retries is configurable. | Yes. Billed per invocation. See Billing overview. | Troubleshoot your function code. |
Infrastructure errors
These errors originate from the platform, not your code.
| Failure cause | HTTP status code | Retry behavior | Billed | Action |
|---|---|---|---|---|
| Concurrency limit exceeded | 429 | Retries for up to 5 hours using binary exponential backoff. The first retry starts after 0.5 seconds; subsequent intervals double (1 s, 2 s, 4 s, 8 s, and so on). | No | Increase your concurrency quota in Quota Center. By default, each Alibaba Cloud account can run up to 100 instances per region. The actual quota is shown on the General Quotas page in Quota Center. |
| Internal system error | 500 | Retries for up to 5 hours using binary exponential backoff. The first retry starts after 0.5 seconds; subsequent intervals double (1 s, 2 s, 4 s, 8 s, and so on). | No | Contact technical support in the DingTalk group (ID: 64970014484). |
| Insufficient resources | 503 | Retries for up to 5 hours using binary exponential backoff. The first retry starts after 0.5 seconds; subsequent intervals double (1 s, 2 s, 4 s, 8 s, and so on). | No | Contact technical support in the DingTalk group (ID: 64970014484). |
What's next
If you encounter problems using Function Compute, see Contact us.