question

efitskie avatar image
0 Votes"
efitskie asked SnehaAgrawal-MSFT answered

Azure Web App restart without reason

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-webapps-availability
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for reaching here! Reached out to you internally, will update here once resolved.

0 Votes 0 ·

1 Answer

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.