When a client actively cancels a request, Function Compute considers that the current instance is unhealthy and starts a new instance. The current instance is stopped after the new instance is started.
You can configure a health check policy to prevent instance restarts. For more information, see Configure a custom health check policy for function instances. After you configure the health check policy, the instance does not restart even if the 499 error is reported when a client actively cancels a request. For more information about how to configure limits and health check policies, see Configure a custom health check policy for function instances.