All Products
Search
Document Center

Function Compute:Why is a function instance restarted after the 499 error occurs on a client?

Last Updated:Dec 01, 2025

If a CPU function has a single-instance concurrency of 1, Function Compute starts a new instance when a client cancels a request. The current instance is stopped after the new instance starts. This happens because an instance with a concurrency of 1 cannot process multiple requests at the same time. This restart prevents a new request from being scheduled to the instance while a previously canceled request is still running, which could affect the function's logic. To avoid instance restarts, use one of the following methods:

  • Method 1: Configure a health check to avoid instance restarts. For more information, see Configure instance health checks. After you configure a health check, the instance does not restart even if a 499 error occurs. The instance's health is then determined by your health check configuration.

  • Method 2: Increase the single-instance concurrency. For more information, see Configure single-instance concurrency. Note: This configuration is not supported for event functions or task functions. Use Method 1.