5

I am using IIS7 for my web app, and for some reason, once in awhile the Application Pool crashes (stops).

I would like to receive an email notification when this happens. Is this possible?

If so, how?

Or, should I be looking at a server monitoring tool to help me with this?

pearcewg
  • 183
  • 3
  • 8
  • Possible dupe: http://serverfault.com/questions/47953/windows-event-log-email-notification – gravyface Sep 08 '11 at 21:10
  • Possible duplicate: http://stackoverflow.com/questions/5527513/iis-app-pool-recycling-randomly-every-few-seconds – Mufasa Sep 12 '11 at 12:55

3 Answers3

3

Turn on health monitoring, pointing to an email provider:

<system.net>
    <mailSettings>
        <smtp deliveryMethod="Network" from="me@example.com">
            <network defaultCredentials="false" 
                     host="example.com"
                     password="mypassword"
                     userName="emailauthenticationusername" />
        </smtp>
    </mailSettings>
</system.net>

<healthMonitoring>
    <providers>
            <add name="MailWebEventProvider"
                 type="System.Web.Management.SimpleMailWebEventProvider"
                 buffer="false" />
      </providers>
      <rules>
        <add name="Application Lifetime Events Default"
             eventName="Application Lifetime Events"
             provider="MailWebEventProvider"
             profile="Default"
             minInstances="1"
             maxLimit="Infinite"
             minInterval="00:01:00"
             custom="" />
      </rules>
</healthMonitoring>
KyleMit
  • 488
  • 4
  • 9
  • 21
Mufasa
  • 428
  • 1
  • 9
  • 20
0

You could check the Event Viewer, to see if an event is written as the Application Pool crashes. You could also try setting limits for it to recycle - those this is more a prevention than cure.

Also, if you're using ASP.NET you could try sending yourself an alert within Application_End/Application_Error methods?

Lazlow
  • 383
  • 3
  • 10
0

[http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add/failure]

Does that help?

David
  • 74
  • 3
  • David, welcome to serverfault. When you find an answer to a question on an external site the convention is to summarise the solution here and link to the source, so that we have a collection of answers here, rather than links. Thanks. – Sam Cogan Sep 08 '11 at 21:05