Azure App Service Auto Heal

Category: microsoft azure site recovery

Question

Joshua Lee Duxbury on Tue, 14 Apr 2020 09:24:54


I'm wanting to setup custom auto heal based of a server error response (status code 500). I'm confused with the Add Status Code Rule and would like some clarity 

Questions 

1. Is this based of every request that is served to the web app? (some requests could be 404 or 200 status codes)

2. Do i have to list every possible status code of the web app?

My current thoughts here are adding two different rules for 200 and 404 status and then if it is any other status code it will recycle the app? 


Replies

SnehaAgrawal-MSFT on Tue, 14 Apr 2020 13:50:22


Thanks for asking question! To elaborate on this Azure App Service, provide this feature to auto-heal or for mitigation action for your service whenever it detects anomaly with the service. This allows you to restart, log or perform custom actions (action) whenever a certain criterion about your App Service is met or triggered. If I understood right, you want to setup custom auto heal based on status code.

 While adding status code rule the question here is “After how many requests you want this condition to kick in? “this means here you have to define number of requests for considering a scenario where you would like to get notified of a situation when your web site starts throwing specific HTTP status codes, sub-status code or win32 status codes and further choose to recycle or simply log an event. As example when it detects that 10 requests resulted in HTTP status code of 500 with sub status code of 100 in last 30 seconds and get triggered.

Also as mentioned in the portal you can configure rules on more than one HTTP Status code condition.

You may want to refer below links for more details on this:

https://azure.microsoft.com/en-in/blog/auto-healing-windows-azure-web-sites/

https://azure.github.io/AppService/2018/09/10/Announcing-the-New-Auto-Healing-Experience-in-App-Service-Diagnostics.html

-----------------------------------------------------------------------------------------------------------------

We're migrating from MSDN to Microsoft Q&A as our new forums and Azure App Service has already made the move!  In future, you can ask and look for the discussion for Azure App Service related questions here:   https://docs.microsoft.com/answers/topics/azure-webapps.html

We are actively working to onboard remaining Azure services on Microsoft Q&A. We will make a public announcement once complete. Want to Learn more about new platform: Microsoft Q&A Getting Started

SnehaAgrawal-MSFT on Thu, 16 Apr 2020 05:22:51


Just checking in to see if the above answer helped answer your question. Let me know if there are still any additional issues we can help with.

 -------------------------------------------------------------------------------------------------------------------- 

If the above answer was helpful, kindly do ‘Mark as answer” and/or ‘Vote as helpful’ the post for benefiting the other users with a similar issue.

Joshua Lee Duxbury on Thu, 16 Apr 2020 15:08:08


No sorry, I guess it's the terminology that is throwing me off slightly when setting up the Auto Heal.

Just to clarify, I know what the auto heal does. Let's say my scenario here is I want to restart the web app if 10 HTTP requests are detected within 1 minute on a 500 status code. 

here are the following options I have to fill in

----------------------------------------------------------

After how many requests you want this condition to kick in? 

= 10

What should be the status code for this requests?

= 500 (is this right?)

How frequently (in seconds do you want to check? 

= 60 (every minute)

-----------------------------------------------------------

I guess the question is why am I being asked "What should be the status code for this requests?"

I thought i was setting up a rule that will restart the service based off a status code ? I don't understand the terminology of why it's asking me "What should be the status code for this requests?"

Should this be saying "What is the status code that will trigger this rule?" or "Status Code that will trigger this condition to kick in?"


Joshua Duxbury



SnehaAgrawal-MSFT on Fri, 17 Apr 2020 15:46:29


Thanks for the valuable feedback on this. The best way to share your feedback would be to create a User Voice feedback item and upvote it. The product group monitors this site for feedback. This is the best way to ensure you are heard and you may receive a response depending on how much they information they can currently share. Having said this, I will reach out to PG team internally on this and share update here.

Joshua Lee Duxbury on Tue, 21 Apr 2020 09:27:40


thanks for the reply, so just to finalise on. If i put 500 in the "What should be the status code for this requests?" field then this will trigger the action if a 500 status code is detected? 

SnehaAgrawal-MSFT on Tue, 21 Apr 2020 16:50:29


Sure, If you put 500 in the "What should be the status code for this requests?" field then this will trigger the action if a 500 status code is detected.  You may also refer to this link for more explanation on this https://azure.microsoft.com/en-in/blog/auto-healing-windows-azure-web-sites/


Joshua Lee Duxbury on Tue, 28 Apr 2020 11:52:58


This didn't work as expected. I put the status code to 200/404 to test on a web service. My expected outcome was that the process should get recycled for every request made to the app with a 200/404 status code.

Should you experience downtime when the process is recycled and does the app get restarted during this process?

SnehaAgrawal-MSFT on Mon, 04 May 2020 06:46:57


 

We apologize for the inconvenience. After performing the initial investigations on the issue with the information you have shared and we feel that this requires a much deeper investigation, so request you to send an email to AzCommunity[at]Microsoft[dot]com  with your subscription ID referencing this thread and we will assist you with engaging Azure technical support.