Using Auto Heal to Recycle Your Site

Joseph JunA new feature that we’re introducing with Update Rollup 11 for Windows Azure Pack is Auto Heal. Auto Heal is a monitoring tool and certain actions can be automatically taken when a condition is reached. For example, if your site uses 500 MB of memory, Auto Heal can be configured to recycle the application pool.

Let’s take a look at how to configure Auto Heal to recycle your site if it reaches 1 GB of memory usage.

First, to use Auto Heal, review the following requirements:

web.config – Direct Modification

If you’re using an out-of-the-box application, you can download the web.config file from your server and then add the following to the section using your preferred text editor:

  <system.webServer>
    <monitoring>
      <triggers>
        <memory privateBytesInKB="1000000"/>
      </triggers>
      <actions value="Recycle"/>
    </monitoring>
  </system.webServer>

Save your changes and then you can upload the updated file to the server.

Visual Studio

If you’re using a homegrown or custom application and you’re editing through Visual Studio, you may see the following warning if you were to try using Auto Heal:
The element ‘system.webServer’ has invalid child element ‘monitoring’
To work around the problem, we highly recommend using a release configuration and then add the following:

  <system.webServer>
    <monitoring xdt:Transform="Insert">
      <triggers>
        <memory privateBytesInKB="1000000"/>
      </triggers>
      <actions value="Recycle"/>
    </monitoring>
  </system.webServer>  

Here’s an example of what your Web.Release.config might look like:

A list of triggers/actions and more information are available in this Knowledge Base article.

Rate this article
   

3 Responses
  • vikram Reply

    i am also getting the same issue .How can i solve it.i have hosted my site on iis 2.0

  • vikram Reply

    Sorry iis version is 8.0

  • Jonathan Reply

    You need to remove this setting in a shared Multi hosting environment as it’s only applicable to reserved servers.

    This is confusing feature and was under impression this is a benefit I can take advantage of.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.



oui décor