Azure App Service Containers don't restart when unhealthy

Michael S. Scherotter 26 Reputation points
2022-01-04T00:56:58.557+00:00

I have an app service (Node on Linux) - with 3-10 instances that has a memory leak (working on that). I am using a health check API and have noticed that when an instance is not healthy, it is not restarted. The Load Balancing is set for 2 minutes and it goes longer than that and eventually all instances fail. Why doesn't the container get restarted when it is seen as unhealthy?
Thanks,
Michael

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
800 questions
{count} vote

Accepted answer
  1. SnehaAgrawal-MSFT 19,196 Reputation points
    2022-01-05T05:26:57.093+00:00

    Adding more to above points:

    Also, you may configure the health check options by configuring the app settings WEBSITE_HEALTHCHECK_MAXPINGFAILURES and set value to 2-10

    This is the required number of failed requests for an instance to be deemed unhealthy and removed from the load balancer. For example, when set to 2, your instances will be removed after 2 failed pings. (Default value is 10)

    Further you may want to know that Load Balancing is the used to Configure the time that an unhealthy instance remains in the load balancer before it is removed.

    Suggest you to refer to this document for more details on health check https://learn.microsoft.com/en-us/azure/app-service/monitor-instances-health-check

    Let us know if further query.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful