Saving web.config caused W2K8 SP1 Machine Restart

Discussion in 'ASP .Net' started by Howard Hoffman, Mar 20, 2009.

  1. We have an ASP.NET application that makes heavy use of the
    System.Threading.ThreadPool for background work. We use the Global.asax
    Application_End end to set a ManualResetEvent that tells the threads to
    cease work. However, if they are very busy it can take as long as 10
    minutes for all of them to end.

    During a period where the threads were indeed very busy, an engineer:

    1) Made a change to web.config for the application. Saved the file.
    2) Immediately surfed to one of the application's web pages.

    There was a delay of about 10 seconds in bringing the page up on step
    2...and the machine restarted itself.

    Stunned, we tried it again an hour later and got the same result.

    There was no dump file, and nothing in the Windows Event Log other than the
    'starting Windows' parade of events. We also noted that our application log
    file had an entry for Application_End, and appeared to end normally (except
    the background threads never reported back that they finished ...).

    What are the expected restart semantics here? I know that saving
    web.config triggers an application-end, which really equates to the
    AppDomain shutting down. I'd thought, however, that any in-flight HTTP
    requests or background threads would continue to work in the to-be-ended
    AppDomain, and that once all that work was finished the AppDomain would
    indeed go away. At the same time a new AppDomain is created to be used for
    new HTTP requests and anything else that is done in the application
    following the Application_Start event.

    Has this changed for W2K8, or am is my understanding of application-restart
    semantics incorrect.

    This machine does have a post W2K8 SP1 / ASP.NET 2.0/3.5 SP1 hotfix :
    967535.

    Any ideas or clarifications greatly appreciated.

    Howard Hoffman
    Howard Hoffman, Mar 20, 2009
    #1
    1. Advertising

  2. On Mar 20, 2:44 pm, "Howard Hoffman" <> wrote:
    > We have an ASP.NET application that makes heavy use of the
    > System.Threading.ThreadPool for background work.  We use the Global.asax
    > Application_End end to set a ManualResetEvent that tells the threads to
    > cease work.  However, if they are very busy it can take as long as 10
    > minutes for all of them to end.
    >
    > During a period where the threads were indeed very busy, an engineer:
    >
    > 1) Made a change to web.config for the application.  Saved the file.
    > 2) Immediately surfed to one of the application's web pages.
    >
    > There was a delay of about 10 seconds in bringing the page up on step
    > 2...and the machine restarted itself.
    >
    > Stunned, we tried it again an hour later and got the same result.
    >
    > There was no dump file, and nothing in the Windows Event Log other than the
    > 'starting Windows' parade of events.  We also noted that our application log
    > file had an entry for Application_End, and appeared to end normally (except
    > the background threads never reported back that they finished ...).
    >
    > What are the expected restart semantics here?   I know that saving
    > web.config triggers an application-end, which really equates to the
    > AppDomain shutting down.  I'd thought, however, that any in-flight HTTP
    > requests or background threads would continue to work in the to-be-ended
    > AppDomain, and that once all that work was finished the AppDomain would
    > indeed go away.  At the same time a new AppDomain is created to be used for
    > new HTTP requests and anything else that is done in the application
    > following the Application_Start event.
    >
    > Has this changed for W2K8, or am is my understanding of application-restart
    > semantics incorrect.
    >
    > This machine does have a post W2K8 SP1 / ASP.NET 2.0/3.5 SP1 hotfix :
    > 967535.
    >
    > Any ideas or clarifications greatly appreciated.
    >
    > Howard Hoffman


    Hi Howard,

    did you check how Rapid Fail Protection is configired on IIS? Maybe
    you use /rebootonerror option to reboot the whole server as it is
    shown on the following tutorial?

    http://blogs.msdn.com/vijaysk/archi...-when-rapid-fail-protection-is-triggered.aspx
    Alexey Smirnov, Mar 20, 2009
    #2
    1. Advertising

  3. Alexey -

    Thanks for the tip and the link.

    No, we do not have Shutdown Exectuable set on our App Pool. Just the
    default value of nothing for Exectuable and also nothing for Exectuable
    Parameters.

    ApplicationHost.config for the app-pool also has not <failure> element, just
    a <processModel> (we have a custom account as the App Pool identity) and a
    <recycling> element.

    Howard

    "Alexey Smirnov" <> wrote in message
    news:...
    On Mar 20, 2:44 pm, "Howard Hoffman" <> wrote:
    > We have an ASP.NET application that makes heavy use of the
    > System.Threading.ThreadPool for background work. We use the Global.asax
    > Application_End end to set a ManualResetEvent that tells the threads to
    > cease work. However, if they are very busy it can take as long as 10
    > minutes for all of them to end.
    >
    > During a period where the threads were indeed very busy, an engineer:
    >
    > 1) Made a change to web.config for the application. Saved the file.
    > 2) Immediately surfed to one of the application's web pages.
    >
    > There was a delay of about 10 seconds in bringing the page up on step
    > 2...and the machine restarted itself.
    >
    > Stunned, we tried it again an hour later and got the same result.
    >
    > There was no dump file, and nothing in the Windows Event Log other than
    > the
    > 'starting Windows' parade of events. We also noted that our application
    > log
    > file had an entry for Application_End, and appeared to end normally
    > (except
    > the background threads never reported back that they finished ...).
    >
    > What are the expected restart semantics here? I know that saving
    > web.config triggers an application-end, which really equates to the
    > AppDomain shutting down. I'd thought, however, that any in-flight HTTP
    > requests or background threads would continue to work in the to-be-ended
    > AppDomain, and that once all that work was finished the AppDomain would
    > indeed go away. At the same time a new AppDomain is created to be used for
    > new HTTP requests and anything else that is done in the application
    > following the Application_Start event.
    >
    > Has this changed for W2K8, or am is my understanding of
    > application-restart
    > semantics incorrect.
    >
    > This machine does have a post W2K8 SP1 / ASP.NET 2.0/3.5 SP1 hotfix :
    > 967535.
    >
    > Any ideas or clarifications greatly appreciated.
    >
    > Howard Hoffman


    Hi Howard,

    did you check how Rapid Fail Protection is configired on IIS? Maybe
    you use /rebootonerror option to reboot the whole server as it is
    shown on the following tutorial?

    http://blogs.msdn.com/vijaysk/archi...-when-rapid-fail-protection-is-triggered.aspx
    Howard Hoffman, Mar 20, 2009
    #3
  4. It now appears this a hardware problem.

    Since my original post, the restarts have spread to random times-of-the-day
    when there is no activity on the machine, or something simple such as a user
    using Windows Explorer to look at file properties.

    Power supply is the current guess.

    Thanks all for your help.

    Howard Hoffman

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "Mark Rae [MVP]" <> wrote in message
    > news:...
    >
    >>> 1) Made a change to web.config for the application. Saved the file.
    >>> 2) Immediately surfed to one of the application's web pages.
    >>>
    >>> There was a delay of about 10 seconds in bringing the page up on step
    >>> 2...and the machine restarted itself.
    >>>
    >>> Stunned, we tried it again an hour later and got the same result.

    >>
    >> That's totally normal behaviour. Any modification to the web.config (or
    >> to the contents of the \bin folder) will cause a web app to recycle.
    >> http://www.west-wind.com/Weblog/posts/5688.aspx

    >
    > Apologies - I misread your OP and thought you meant that the web app had
    > restarted, not the whole webserver!
    >
    > That is indeed strange. Does Alexey's reply shed any light on it...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    Howard Hoffman, Mar 24, 2009
    #4
  5. On Mar 24, 5:03 pm, "Howard Hoffman" <> wrote:
    > It now appears this a hardware problem.
    >
    > Since my original post, the restarts have spread to random times-of-the-day
    > when there is no activity on the machine, or something simple such as a user
    > using Windows Explorer to look at file properties.
    >
    > Power supply is the current guess.
    >
    > Thanks all for your help.
    >


    Hopefully it helps :)
    Alexey Smirnov, Mar 24, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard K Bethell

    machine.config changes - restart needed?

    Richard K Bethell, Dec 19, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,076
    Natty Gur
    Dec 19, 2003
  2. MichiMichi
    Replies:
    0
    Views:
    362
    MichiMichi
    Feb 21, 2007
  3. Vijay
    Replies:
    1
    Views:
    296
    Joern Schou-Rode
    Nov 1, 2008
  4. Oriane
    Replies:
    1
    Views:
    655
    Oriane
    May 19, 2009
  5. Judy
    Replies:
    0
    Views:
    1,017
Loading...

Share This Page