Azure Web App restart without reason

Eric Fitskie 96 Reputation points
2021-10-06T07:31:02.863+00:00

Ik have a Azure Web App that is running a statefull application. This application restarts multiple times a day without me knowing what's the reason for this. Because it's a statefull web application, logged-in users need to log-in everytime the web app restarts. That's annoying for them when i can't explain why this happend.

I've setup the Web App with "Always on" to on and "ARR affinity to on. Also the WEBSITE_PROACTIVE_AUTOHEAL_ENABLED configuration is set to false.

The “Availability and Performance” -> “Web App Restarted” and "Application Crashes” blades does not show any information about the restarts.

How do i find out why these restarts happen?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,326 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 20,241 Reputation points
    2021-10-19T11:16:21.383+00:00

    Update: Its found that the restarts are occurring due to the Health Check feature which is currently enabled for this site.

    Health Check feature automatically removes a faulty instance from rotation, thus improving availability. This feature will ping the specified health check path on all instances of your webapp every minute. If an instance does not respond or responds with a failure for 10 minutes (5 pings), the instance is determined to be unhealthy and our service will stop routing requests to it. It is highly recommended for production apps to utilize this feature and minimize any potential downtime caused due to a faulty instance.

    In this case Application evaluated unhealthy due to redirection.

    Description: We noticed the configured health check URL was responded back with a redirect status code by the application. Status codes outside of 200 to 299 range are considered as failure by health check.

    Recommended action: If the application has HTTP to HTTPS redirectoin, consider one of the following solutions.

    a. Enable 'HTTPs Only' from the TLS/SSL settings blade for the respective App Service. This will force health check pings to over 443.

    b. Modify the Application logic/ad a URL Rewrite rule so that requests from the user agents – ReadyForRequest/1.0+(HealthCheck) & HealthCheck/1.0 are not redirected.

    0 comments No comments

0 additional answers

Sort by: Most helpful