locked
Random, Unexpected AppDomain Restarts RRS feed

  • Question

  • User1067973529 posted

    Ever since I've migrated from ASP.NET 1.1 to 2.0, I've noticed that the application restarts on its own, at random times, due to no particular reason.

    I'm not using an Antivirus scan, I am not changing any bin or config files, I'm not using app pool recycling, and I'm not getting unhandled exceptions that show up in the Event Viewer logs. 

    As this has been happening for over 2 months now, I finally found the code necessary to log out exactly what is causing the AppDomain to restart, and every time I get the following message:

    _shutDownMessage=Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config
    CONFIG change
    HostingEnvironment caused shutdown

    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    I am not changing config files in the directory above.  As I stated, there is no Antivirus running or anything else that touches these files.

    Is this due to the fact that I am often changing files in subdirectories beneath the web site root?  If so, why does the message talk about the v2.0 folder changing?  Can the functionality of automatically restarting the application be disabled?  I need to change, add, and delete files in directories beneath the web site root and would prefer not to migrate them outside into a non-Internet directory.  As these files are not ASP.NET files, why should changing them cause an app restart?

    If this restarting problem is not due to changing files inside the web site, is it a bug?  Is Microsoft working on a hot fix?

    I've changed my session management to use the State Server, as having to log in at random times during the day is just unacceptable in a production environment.  Restarts can happen as often as 10 times a day or as little as once per day.  It seems to only occur during the week and hardly ever on weekends.

    It seems like there are others out there with this same problem.  I am overall happy with the new version of ASP.NET, but this problem is simply driving me crazy with no clear answer in sight.

    Any help on this would be greatly appreciated.

    Friday, March 10, 2006 9:33 AM

All replies

  • User-2118745002 posted

    Can you try setting values to the httpRuntime change notification attributes?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    <o:p> </o:p>

    <?xml version="1.0"?><o:p></o:p>

    <configuration><o:p></o:p>

       <system.web><o:p></o:p>

           <httpRuntime maxWaitChangeNotification="x" waitChangeNotification="y" /><o:p></o:p>

       </system.web><o:p></o:p>

    </configuration><o:p></o:p>

    <o:p> </o:p>

    In theory, waitChangeNotifications is the amount in seconds to wait between two files copied, and maxWaitChangeNotifications is the amount in seconds for the whole copy process. See http://msdn.microsoft.com/en-us/library/e1f13641.aspx for more details. I guess the best location to set these values should be the %SystemDrive%D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\web.config file.<o:p></o:p>

    <o:p> </o:p>

    Friday, March 10, 2006 7:03 PM
  • User-917461142 posted
    Glad to hear I am not the only one with this problem, but it would be a huge relief if someone could find the root cause.  I have a web app that worked fine in the Beta 2 version, and as soon as I loaded the release version of .NET 2.0 I started seeing this same random restart behavior.  No server configuration changes were made - the restarts began within an hour of going to the release version from Beta 2.  I currently have the same app installed at 5 different locations - I am only having the restart issue at one.  I have been working on this for 3 months trying to get a fix, and with Microsoft for about the last month.  I have tried uninstalling McAfee virus protection, stopping various services, and just can't seem to make any headway as to what is causing the problem.  I get the exact same "Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config
    CONFIG change" as described. 

    Here are the systems:
    Windows 2000 Server, .NET 2.0 - restart issue (was fine with Beta 2)
    Windows 2003 Server, .NET 2.0 Beta 2 - no issues (same customer as above, so has same software loaded)
    Windows 2000 Server, .NET 2.0 - no issues
    Windows 2003 Server, .NET 2.0 - no issues
    Windows XP Pro, .NET 2.0 - no issues (dev laptop)

    Unlike your app, I am not doing anything with subdirectories, although I have read about problems with restarts caused by changing the subdirectories.

    Just for the record, here is the code I am running to determine the cause of the app restart:
    http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx

    I will post anything I find to this thread, in hopes that we can collectively find a fix.
    Sunday, March 12, 2006 9:10 PM
  • User1067973529 posted

    I've looked at this, and the default settings for both of these attributes is 0.  Does this mean that technically the app should restart on every change (i.e. no time is allowed between file changes) or never (i.e. 0 = don't wait)?  If 0 means it's disabled, why even have these attributes?  I guess I could try setting these to some incredibly high number but seeing as how ci2 is having the same restart problem without changing files at all, I doubt this is the road to go down.

    If this is not a bug with ASP.NET in general (which it might be) the only other configuration settings that I can think of that would affect the overall application might be in the process model attributes, in machine.config.  Just for kicks, the process model I am using in production is:

                <processModel
                    enable = "true"
                    timeout = "Infinite"
                    idleTimeout = "Infinite"
                    shutdownTimeout = "Infinite"
                    requestLimit = "Infinite"
                    requestQueueLimit = "Infinite"
                    restartQueueLimit = "Infinite"
                    memoryLimit = "80"
                    webGarden = "false"
                    cpuMask = "0xffffffff"
                    userName = "SYSTEM"
                    password = "AutoGenerate"
                    logLevel = "All"
                    clientConnectedCheck = "00:00:05"
                    comAuthenticationLevel = "Connect"
                    comImpersonationLevel = "Impersonate"
                    responseDeadlockInterval = "Infinite"
                    responseRestartDeadlockInterval = "Infinite"
                    autoConfig = "false"
                    maxWorkerThreads = "1000"
                    maxIoThreads = "1000"
                    minWorkerThreads = "1"
                    minIoThreads = "1"
                    serverErrorMessageFile = ""
                    pingFrequency = "10675199.02:48:05.4775807"
                    pingTimeout = "10675199.02:48:05.4775807"
                    maxAppDomains = "2000"
                />

    I've tried maxing out all of the attributes to no avail.  If anyone else has an idea, I'm all ears.

    Tuesday, March 14, 2006 7:08 AM
  • User-917461142 posted

    Just found out there is a non-public .NET 2.0 HotFix available from Microsoft that is meant to address this issue.  You will have to contact MS Tech Support to get it.  I just loaded it this morning and am waiting to see if it takes care of the problem.  It is specifically for sites that have lots of subdirectories or that do a lot of subdirectory manipulation.  I don't think my app fits this description, but I am willing to try.  The shutdown reason which this is meant to fix is the same as what we are getting.

    From previous discussions, I don't think you can disable the recycle when config files change by altering any of the config values.

    I'll let you know later today if the HotFix took care of the issue for me.

    Tuesday, March 14, 2006 9:06 AM
  • User1067973529 posted

    Thanks for the info.... do you know what the hotfix reference ID is so that I can try to get my hands on it as well?  I've never dealt with the MS Tech Support, what is the best way to contact them?  In any case I'm interested in hearing your evaluation of the hotfix & I hope it doesn't create more problems than it solves.

    Tuesday, March 14, 2006 9:41 AM
  • User390817712 posted

    From previous discussions, I don't think you can disable the recycle when config files change by altering any of the config values.

    There are some options to avoid recycles, depending on what you change. You could move sections of a config file to an external source (configSource=foo.config) and change machine.config to ignore this particular section when it changes (restartOnExternalChanges="false").

    I have some details in my article here: The Configuration API in .NET 2.0

    I'll be interested to hear if your hotfix helps.

    Tuesday, March 14, 2006 10:52 AM
  • User-917461142 posted

    Well, it's been up for 12 hours now with no restarts, which leads me to believe the MS HotFix took care of the problem.  Before about the longest it could go was 3 hours or so.  This has been such a long, drawn out ordeal that I have a hard time believing it's finally over!  Time will tell, I guess.

    Here is what it is:

    Hot Fix for Microsoft Knowledge Base article number(s) 913393

    However, I can't find any information on it.  The file is password protected, and not yet publicly available.  If you contact Microsoft Technical Support, they should be able to set you up with a download.  Have not yet seen any side effects, but I am watchful.  I will post back if I encounter any problems.

    As far as contacting MS tech support, go to microsoft.com and look for support options.  I have support incidences included with my MSDN subscription, so I don't know if there is a cost.

    Tuesday, March 14, 2006 7:13 PM
  • User1067973529 posted

    I've tried contacting Microsoft but they won't give me the hotfix as it is not officially in the knowledge base yet.  ci2, have you gone the last 2 days without a restart?  Do you know when this will be publicly available or how to get ahold of it before then?

    I look forward to putting this this problem to rest.

    Thanks for your help!

     

    Thursday, March 16, 2006 8:13 AM
  • User-917461142 posted

    Really... that's not very good customer support.  The support engineer said it would be included in the next service pack for .NET.  When I called in, I was routed to the ASP.NET support team - maybe you could try that route and ask for them.

    The web app has been running strong with no unexpected retarts for the past 3 days - previously I was lucky if it would go 3 hours.

    Friday, March 17, 2006 9:01 AM
  • User1858558508 posted
    For what it's worth, we've been having the same AppDomain shutdown problem with .NET 2.0.   Seems that whenever a subdirectory is deleted from the main webapp directory, a File Change Notification is triggered which restarts the app.  If you're storing critical info in the session (using InProc session state), your session will be lost.  Like the original poster, we've switched our session to the ASP.NET State Service, so our session persists across AppDomain restarts, but we'd rather not have the app go down so often.

    More reading:
    http://blogs.msdn.com/toddca/archive/2005/12/01/499144.aspx
    http://weblogs.asp.net/owscott/archive/2006/02/21/438678.aspx

    I'd be very interested in hearing about a hotfix... Ideally, we'd have a setting available in the Web.config that would exclude certain subdirectories from the File Change Notifications.

    -John Reilly
    Tightrope Media Systems
    http://www.trms.com/
    Friday, April 7, 2006 3:40 PM
  • User-218937343 posted
    ci2, just want to follow up with your last posting. Understand you enjoyed 3 days without restarts. Any new updates? Do you think the hotfix really fix the restart problem? Any side effects noticed? Please let us know. Thank you so much.

    Randy

    Saturday, April 15, 2006 10:57 PM
  • User-218937343 posted

    Just some bedtime reading material in case anyone has trouble sleeping.

    I took a little further look into this Microsoft hotfix over the weekend, and got a better understanding what's really happening here.

    Basically, ASP.Net 2.0 runtime uses a FileSystemWatcher to monitor each subdirectory in a web app's root folder. It not only picks up files that got modified, but also files whose last access time changed. If the changes in the folders reach over a certain threshold, ASP.Net will initiate a new deployment. In ideal world, this will work perfectly.

    The problem is the files and directories are constantly accessed by many processes (including IIS itself, NAV and other Windows services). We have noticed that a file can be accessed many times in seconds. And the Win32 FileSystemWatcher base has a pitiful small event buffer. At the time that the files' last access times got bombarded, FileSystemWatchers pick up too many change events almost at the same time. It's buffer simply overflowed. And exception is thrown from ASP.Net runtime (not from an individual web app). And IIS/ASP.Net catches the exception and has to reload the web app.

    Note that the web app shutdown is not caused by the changes in the file system, it is because of the FileSystemWatcher's buffer overflow. Some smart developer on the internet reverse engineered the error message to trace to this real cause.

    You probably can figure out what's in the Microsoft hotfix. Typically Microsoftly, they might have lengthen the FileSystemWatcher's polling interval and enlarge the buffers. Surely, this will fix our IIS reloading problem. But that doesn't get to the bottom of this issue!

    The reason Microsoft monitors the last access times, besides the last modified times of files and folders, is that when you copy a file to overwrite an existing one, file system will change the file's last access time, while leaving the last modified time alone. Microsoft wants pick up this change. This is fine. But taking into consideration that our files and folders got their last accessed time changed so frequently, Microsoft's watchers might inavidably impact on the web server performance. Note that a folder's last access time gets changed even when a process lists the files of the folder without touching any file in it.

    My recommendation is that we turn off the monitoring when we are NOT deploying our web apps. Unfortunately, there is no easy way to turn it off in the web.config file. I think we can do a trick to achieve the same effect, by running the following DOS command:

    Fsutil behavior set disablelastaccess 1 This tells NTFS not to update a folder's last access time when the folder is listed or when files in it got accessed. This way, ASP.Net's file watchers won't pick up any access change events on folders.

    Not that this might very well disable the automatic deployment feature for all web apps on the box, since this behavior is NTFS global behavior. But if your web app owns the box, we should be able to do it. But don't forget to set disablelastaccess back to 0 before we do a deployment so ASP.Net's file watchers will pick up the changes again.

    Hopefully, I haven't got you snoring already.

    Randy

    Monday, April 17, 2006 11:11 AM
  • User587494153 posted
    I am seeing the similar issue. I did not even get any event log till added health monitoring to log all events. Has anyone found a solution to this problem?

    Event Type: Error
    Event Source: .NET Runtime
    Event Category: None
    Event ID: 0
    Date: 4/19/2006
    Time: 2:52:26 PM
    User: N/A
    Computer:
    Description:

    The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:

    _shutDownMessage=Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\...\70729017\43389b16
    Change in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\...\70729017\43389b16\hash.web
    HostingEnvironment caused shutdown

    _shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    at System.Environment.get_StackTrace()
    at System.Web.HttpRuntime.ShutdownAppDomain()
    at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
    at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state).
    Thursday, April 20, 2006 3:24 PM
  • User-917461142 posted

    Sorry about not providing an update sooner - apparently the email notifications are no longer coming through...

    Everything is still running perfectly after applying the hotfix!

     

    Friday, June 30, 2006 8:12 AM
  • User-953142035 posted

    We began having the same appliation restarts after converting to ASP2.0.  I've installed the hotfix but am continuing to get the restarts - see event log details below.  Just curious, are you still running fine with the hotfix?

    _shutDownMessage=Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config

    CONFIG change

    CONFIG change

    HostingEnvironment caused shutdown

    Overwhelming Change Notification in c:\inetpub\wwwroot

    _shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

    at System.Environment.get_StackTrace()

    at System.Web.HttpRuntime.ShutdownAppDomain()

    at System.Web.Configuration.HttpConfigurationSystem.OnConfigurationChanged(Object sender, InternalConfigEventArgs e)

    at System.Configuration.Internal.InternalConfigRoot.OnConfigChanged(InternalConfigEventArgs e)

    at System.Configuration.BaseConfigurationRecord.OnStreamChanged(String streamname)

    at System.Web.Configuration.WebConfigurationHostFileChange.OnFileChanged(Object sender, FileChangeEvent e)

    at System.Web.DirectoryMonitor.FireNotifications()

    at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)

    at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)

    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Threading.

    Tuesday, July 11, 2006 6:53 PM
  • User-1084200161 posted

    We have another hotfix for Overwhelming changes.  The knowledge base article 920970 will be published soon.

     

    Please use the Contact feature of the forum and send me an email and I will send you this new fix to try.

     

    Thanks!


    Radomir

    ASP.NET Support

    Thursday, July 27, 2006 12:47 PM
  • User-1492230345 posted

    We have the same frequent application shutdown/restart problem, but we are running ASP.NET 1.1 and DNN 3.2.2.16558. Any information on what may be causing the problem and how to solve it?

     We had eliminated the following cuases:

     1. Changes in web.config or machine.config
       2. Changes in files in \bin folder
       3. New folder under web application folder
       4. Changes of files under web application folder
       5. The possible effect of anti-virus product.

    Thanks
     

    Monday, August 28, 2006 3:49 AM
  • User-619846739 posted

    The previous KB article seems to have changed.  The one that addresses the "Overwhelming changes have occured" is

    http://support.microsoft.com/kb/913297/

    This addresses the bug that exists.  There are real situations when this will occur, as already covered in this thread.

    Scott

     

    Thursday, August 31, 2006 9:36 AM
  • User-679412356 posted

    Hi,

    Can anyone post (or e-mail) this hot-fix (http://support.microsoft.com/kb/913297/) somewhere, so we can test it ?

    Thanks in advance!

     

    Sunday, September 3, 2006 7:51 PM
  • User-619846739 posted

    Microsoft purposefully requires you to call in for this hotfix.  They don't allow other people to post those hotfixes.  It's a free call though so you can obtain it easily by giving them a call directly.

    Thanks,

    Scott

    Sunday, September 3, 2006 9:11 PM
  • User-679412356 posted

    Microsoft purposefully requires you to call in for this hotfix.  They don't allow other people to post those hotfixes.  It's a free call though so you can obtain it easily by giving them a call directly.

    Thanks,

    Scott

    Thanks for your fast reply, Scott.

    That sound easy, but not in the-end-of-the-world (where I am). Can some charitable soul email it to lamp159 at mail dot com? That will be highly appreciated.[:)]

     

    Monday, September 4, 2006 10:22 AM
  • User-1084200161 posted

    nagscreen, I just sent you the download location to that email address.

     

    Also, can user ayurov send me another email with alternate address.  Tried sending hotfix location but email got bounced.

     

    Thursday, September 7, 2006 2:43 PM
  • User-679412356 posted

    nagscreen, I just sent you the download location to that email address.

    Thanks!! [:D]   worked great (solved the issue)

    Thursday, September 7, 2006 5:06 PM
  • User1268210276 posted

    i'v been with the same problem for a couple of weeks, can anyone send me a copy, my eamil address is 'julyleecn at hotmail dot com', thanks

    Friday, September 8, 2006 11:17 PM
  • User-1084200161 posted
    nutshell, I just sent it to that address.
    Monday, September 11, 2006 11:47 AM
  • User-842092983 posted

    Finally, I see some hope now.

    I have similar problem for a while,  I have two live and one dev server. I almost don't have a any traffic. My application on all three servers will restart randomly, usually after 10 to 15 minutes, but  could be longer like 40 minutes.ScottGu's blog,

    string shutDownMessage = (string)runtime.GetType().InvokeMember("_shutDownMessage",

    System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance

    | System.Reflection.BindingFlags.GetField, null, runtime, null);

     But I don't get the Overwhelm change notification, I only get

     

    _shutDownMessage=HostingEnvironment caused shutdown

    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    Could someone tell me if you use the same logging code?

    I think I have the same issue as you guys, could someone send me the hotfix too.

    thanks a lot!

    Monday, September 11, 2006 2:16 PM
  • User1231351438 posted

    Is there anyone else who installed the hotfix and is still having problems?

    I called MS and got the hotfix but it didn't fix the problem.  I have 3 main webapps that I have logging there shutdown message and only two of the three have the problem.  The only difference in them is the amount of load, the one that doesn't restart has very little load where the others have a moderate load.  The two that do restart don't restart at the same time but frequently they restart within 10 minutes of one another.

    Anyone have any other suggestions as to how to fix this?  I turned off the NTFS last access time and that didn't have any effect.

     _shutDownMessage=Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config
    CONFIG change
    CONFIG change
    HostingEnvironment caused shutdown
    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Configuration.HttpConfigurationSystem.OnConfigurationChanged(Object sender, InternalConfigEventArgs e)
       at System.Configuration.Internal.InternalConfigRoot.OnConfigChanged(InternalConfigEventArgs e)
       at System.Configuration.BaseConfigurationRecord.OnStreamChanged(String streamname)
       at System.Web.Configuration.WebConfigurationHostFileChange.OnFileChanged(Object sender, FileChangeEvent e)
       at System.Web.DirectoryMonitor.FireNotifications()
       at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)
       at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

     

    Wednesday, September 13, 2006 2:27 AM
  • User-679412356 posted

    as paul28 said:

     1. Changes in web.config or machine.config
       2. Changes in files in \bin folder
       3. New folder under web application folder
       4. Changes of files under web application folder
       5. The possible effect of anti-virus product.

    just in case, add cause "6" = deleting any folder under web application folder

     

    Wednesday, September 13, 2006 8:36 AM
  • User-2010697931 posted

    I am having the same Session Loss problem due to unexpected AppDomain Restart. But similar as wyx2000, I don't get 'Overwhelm change notification' neither, and I only get:

     _shutDownMessage=HostingEnvironment caused shutdown

    Could anyone please send the two hot fixes (913393 and 913297) to my email account 'yangfangcr at hotmail dot com'? That will be greatly appreciated.

    Thanks.

    Tuesday, October 3, 2006 5:19 PM
  • User-122906572 posted

    I'm having the same issue...sorry to beg but not having much luck from MS can some kind soul send the hotfixes to me : boggle at phola dot com

    Cheers 

     

    Tuesday, October 24, 2006 11:28 AM
  • User556828474 posted
    Can anyone send me a hotfix, that fix this problem. I have such problem after migrating to .net 2.0. my mail is hatroman@mail.ru. Thanks In Advance

    Thursday, October 26, 2006 2:14 AM
  • User1131404814 posted
    I have exchanged same problem, Radomir, can you please send me url for download hotfix?
    Tuesday, November 14, 2006 4:37 AM
  • User-1820423074 posted

    Radomir, any chance you (or anyone else) can send to me also.  We have having this exact issue and I would like to test the hotfix.

    mike at cindynmike.com

     Many thanks in advance..

    Thursday, November 23, 2006 6:57 AM
  • User-1321422805 posted

    Hi!

    I have the same problem with the application started/shutdown and found this thread.
    Is there any news or am I still adviced to use the discussed hot fixes 913393 and 913297?

    Did you install both hotfixes or just one of them?

    TIA
    /W

     

    Tuesday, January 2, 2007 11:02 AM
  • User161531571 posted
    Can anyone send me a hotfix, that fix this problem. I have such problem after migrating to .net 2.0. my mail is revcom@ukr.net. Thx.
     
    Why microsoft don't publish this fixes?

    http://support.microsoft.com/kb/913297/

    http://support.microsoft.com/kb/920970

    Wednesday, January 17, 2007 1:53 PM
  • User-1304349689 posted
    Hi. I met the same problem. Can anyone mail me the hotfix? Thanks. my email: yuhao_k7 at 163.com
    Monday, January 22, 2007 4:30 AM
  • User662954416 posted
    > _shutDownMessage=HostingEnvironment caused shutdown
    The main point is that this means:
    HostingEnvironment.ShutdownReason = ApplicationShutdownReason.HostingEnvironment
    not any of the other possible reasons from ApplicationShutdownReason which are could be taken care over.
    I didn't see a clear solution yet and still experiencing the problem. Just wondering why...

    Member name Description
    BinDirChangeOrDirectoryRename The AppDomain shut down because of a change to the Bin folder or files contained in it.
    BrowsersDirChangeOrDirectoryRename The AppDomain shut down because of a change to the App_Browsers folder or files contained in it.
    ChangeInGlobalAsax The AppDomain shut down because of a change to Global.asax.
    ChangeInSecurityPolicyFile The AppDomain shut down because of a change in the code access security policy file.
    CodeDirChangeOrDirectoryRename The AppDomain shut down because of a change to the App_Code folder or files contained in it.
    ConfigurationChange The AppDomain shut down because of a change to the application level configuration.
    *HostingEnvironment The AppDomain shut down because of the hosting environment.* <--
    HttpRuntimeClose The AppDomain shut down because of a call to Close.
    IdleTimeout The AppDomain shut down because of the maximum allowed idle time limit.
    InitializationError The AppDomain shut down because of an AppDomain initialization error.
    MaxRecompilationsReached The AppDomain shut down because of the maximum number of dynamic recompiles of resources limit.
    None No shutdown reason provided.
    PhysicalApplicationPathChanged The AppDomain shut down because of a change to the physical path for the application.
    ResourcesDirChangeOrDirectoryRename The AppDomain shut down because of a change to the App_GlobalResources folder or files contained in it.
    UnloadAppDomainCalled The AppDomain shut down because of a call to UnloadAppDomain.


    Monday, January 22, 2007 10:29 AM
  • User-875453361 posted

    I have the same issue can someone email it to me at brian.sheridan at gmail.com.

     

    Thanks 

    Tuesday, February 6, 2007 7:37 PM
  • User-446399420 posted
    I am having this same issue. Can someone send me the file at mcbeev at gmail.com ?
    Tuesday, March 6, 2007 1:03 PM
  • User-400616500 posted

    Can any kind souls send the hotfixes to ihavenoanime at hotmail.com ? Thanks in advance!

    Thursday, May 3, 2007 3:37 PM
  • User2030289514 posted

    Hi ALL,

     I followed this discussion for a while because I experience the same issue (...overwhelming restarts...). http://support.microsoft.com/kb/913297/

    So, any Microsoft employees around in this Forum? I can't believe that it should be the solution that hotfixes are exchanged between users? What is the secret about the hotfix?

    I am a developer and do not even know if I 'earned' the right (by purchasing a certain MS product) to contact the support? Can anybody tell me what it takes to ask for a hotfix w/o giving first your credit card? Luckily I never needed the support in over 10 years.

    However, I do not want to complain. I just want to know the current status? Is the hotfix publicly available? Does it cost something? Do I have to call the MS support guys? Is (was) the hotfix already included in any SP?

    Can anybody point me in the right direction? Any help is appreciated! MS folks: would be cool to get an official statement from you as well. Thanks.

    regards

    Frank

    Wednesday, June 6, 2007 9:37 PM
  • User1805008792 posted

    Hi All,

    I am also facing similar problem, is there any update regarding these fix's, if not

    Can anyone send the hotfixes to ak_joshi4u at yahoo dot com ? Thanks in advance!

    Tuesday, September 11, 2007 6:14 AM
  • User64060502 posted

    Can any one send hot fix to dineshvimal@gmail.com -

    issue

    _shutDownMessage=Overwhelming Change Notification in <VAR>DirectoryPath</VAR> 

     

    Wednesday, November 7, 2007 12:00 AM
  • User769384800 posted

    I am looking for the same fixes. Can some please email it to me at payur@yahoo.com? Thanks in advance.

     

    Friday, November 16, 2007 8:34 AM
  • User2030289514 posted

    Hello,

     

    this is quite an old post thread and the issue seems to be a random one and only a small set of developers are concerned.

    So, my issue is basically solved w/o hotfix ... reason why I didn't follow that theory with the hotfix was that I didn't feel it would be the solution, otherwise MS would make it publicly available.

    Following might help all others who are experiencing the issue:

    I assume you checked that your BIN directory had no changes, you did not delete sub-directories from your application, no changes to any .config file, and you made sure that the number of recompilations due to uploading new .aspx files did not exceed the default of 15.

    Other likely reasons for restarts are: other processes touch the monitored directories: e.g. virus scanning software or back-up software, and maybe the indexing service (but I am not really sure about the impact of the latter).
    If you are running in a dedicated environment you possibly have control over the frequency of virus scans etc. OR just exclude certain application directories.
    If you are running in a VPS environment you might to have to ask your hoster what the processes are that run at node level and if the virus scan frequency can be determined and limited.

    Are you running in a shared environment?: it's quite unpredictable what can happen there because you do not know the hoster's settings and resource allocations for applications: e.g. if they limit the Application Pool memory-wise and shoot for a low amount of memory while packing tons of applications into the pool... then the pool could recycle very often. The explanation why your own application came up with that 'restart feature' out of the blue might be that it is NOT about your application but about the others that force the application pool to recycle. I tested that by bringing an application that never recycled unusually often to a hoster where I had an application that recycled often and that application started to show the same behavior - so the hosting company was the reason.

    Memory leaks: if you have memory leaks in your application then it could drive up the memory consumption and when reaching the pool's limit it recycles.

    Hope that helps some of you,

    regards

    Frank

    Thursday, December 20, 2007 8:14 AM
  • User182620130 posted

    I HAVE THE SOLUTION

     AspNet2.0 start a file monitoring on all files and folder of WebApplication.

    When a directory is created or deleted, or some files are modified when the WebApplication is running the AppDomain can be restarted and the WebApp recompiled automatically.

     To stop this stupid behaviour i must stop the FCN monitoring using reflection, using this procedure at the start

                Dim p As PropertyInfo
                Dim o As Object
                Dim m As MethodInfo
                p = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Static)
                o = p.GetValue(Nothing, Nothing)
                m = o.GetType().GetMethod("Stop", BindingFlags.Instance Or BindingFlags.NonPublic)
                m.Invoke(o, New Object() {})
    

     Hope this helps,

    Paolo Marani - paolo.marani[at]engineering.it

    Friday, February 8, 2008 11:21 AM
  • User-753913104 posted

    Did you get solution to the above problem.

    Actually we are getting the same just _shutDownMessage=HostingEnvironment caused shutdown

    Usually I see the message also say wether it is a config file change, global.asax change or bin dir change or other useful info. But we are getting just like message you are getting above.

    These random recycles happens evry once in an hr . It is killing us without giving any useful info despite enabling all kinds of logs.

    If you have found solution to this, please let us know.

    Thanks

    Veena

    Friday, February 8, 2008 8:42 PM
  • User-753913104 posted

    I have similar problem for a while,  I have two live and one dev server. I almost don't have a any traffic. My application on all three servers will restart randomly, usually after 10 to 15 minutes, but  could be longer like 40 minutes.ScottGu's blog,

    string shutDownMessage = (string)runtime.GetType().InvokeMember("_shutDownMessage",

    System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance

    | System.Reflection.BindingFlags.GetField, null, runtime, null);

     

     

     But I don't get the Overwhelm change notification, I only get

     

    _shutDownMessage=HostingEnvironment caused shutdown

    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    Could someone tell me if you use the same logging code?

    I think I have the same issue as you guys, could someone send me the hotfix too.

    thanks a lot!

    Friday, February 8, 2008 8:51 PM
  • User807886609 posted

    If you write or modify a file anywhere in the web application root or subfolders, this constitutes a change that ASP.NET will pick up, and  it will recycle your application. It's just that simple. If  you change, add or delete files anywhere in the website then this is what will happen. You can set different parameters to raise the "trigger" mechanism, but it will still be triggered if you hit the maximum.

    I believe you need to re-think what you are doing in these various directories with regards to how IIS is designed to recycle the AppPool. It may be that if your business logic requires a lot of folder / and / or file changes, you can put these into folders outside of your web application root where they will not trigger the ASP.NET app recycling mechanism.

    Friday, February 8, 2008 9:59 PM
  • User182620130 posted

     The code snippet i have posted few message above do really remove the "trigger" on file changes for me, no more restarts now, i hope anyway that a cleaner solution will be provided in the form of a web.config settings where to specify what directories to ignore. I just have no time to redesign my application to circumvent this limitation. Big mi$take from micro$oft this time!

    Saturday, February 9, 2008 8:49 AM
  • User858137484 posted

     Yes, it's that simple and that's a desired behaviour. Why is that so difficult to understand? I create dynamic PDF documents in subdirectories in my application which are then accessible through links. In time these subdirectories are deleted. Why did Microsoft have to break something that was working so well in v1.1?!

    Can someone, please, send me that hotfix to alterin at gmail dot com? Please....
    Thanks!

    Wednesday, April 9, 2008 7:29 AM
  • User-786870196 posted

    Could someone please send the hotfix to tadewusi at yahoo dot com?

    I'm also receiving the error on my reportserver.

     

    _shutDownMessage=HostingEnvironment caused shutdown

    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

     

    Friday, April 18, 2008 6:46 AM
  • User858137484 posted

    tedewusi,

    No one sent that to me but here I found a solution that works just great:

    https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=240686

    Entered by [By]Kritter on 7/23/2007

    A dirty hack that works:
    PropertyInfo p = typeof(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
    object o = p.GetValue(null, null);
    FieldInfo f = o.GetType().GetField("_dirMonSubdirs", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase);
    object monitor = f.GetValue(o);
    MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", BindingFlags.Instance | BindingFlags.NonPublic);
            m.Invoke(monitor, new object[] { });

    This code will turn off monitoring from the root website directory, but monitoring of Bin, App_Themes and other folders will still be operational, so updated DLLs will still auto deploy.

     

    Friday, April 18, 2008 7:30 AM
  • User-786870196 posted

    Radomir,

    Could you please send the fix to tadewusi at yahoo dot com ? I have not fixed the issue.

    Monday, April 21, 2008 9:32 AM
  • User-1123333552 posted

                Dim p As PropertyInfo
                Dim o As Object
                Dim m As MethodInfo
                p = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Static)
                o = p.GetValue(Nothing, Nothing)
                m = o.GetType().GetMethod("Stop", BindingFlags.Instance Or BindingFlags.NonPublic)
                m.Invoke(o, New Object() {})
     

    Hi

    did this solution worked for any of you and has any one tested it and if yes, where to write this code..? On which page..?

    Monday, June 9, 2008 11:33 PM
  • User858137484 posted

    The code I posted earlier (two or three posts before yours) works just great on a live site with more than a 100 simultaneous users every day. Use this as it's narrower and I think your snippet stops entirely the moniring and you don't want that. If you have problems that the code's in C# here is the VB code (put that in global.asax on application start):

    Dim p As PropertyInfo = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.[Public] Or BindingFlags.[Static])
    Dim o As Object = p.GetValue(Nothing, Nothing)
    Dim f As FieldInfo = o.[GetType]().GetField("_dirMonSubdirs", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.IgnoreCase)
    Dim monitor As Object = f.GetValue(o)
    Dim m As MethodInfo = monitor.[GetType]().GetMethod("StopMonitoring", BindingFlags.Instance Or BindingFlags.NonPublic)
    m.Invoke(monitor, New Object() {})
     
    Tuesday, June 17, 2008 9:17 AM
  • User1313428384 posted

     Hi, I am getting exactly the same error as you "tadewusi":

     

    _shutDownMessage=HostingEnvironment caused shutdown

    _shutDownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at System.Web.HttpRuntime.ShutdownAppDomain()
       at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    Did you fix the problem? How?

     Please advise.

    /thanks

     

    Tuesday, July 8, 2008 9:03 AM
  • User-786870196 posted

    I've not applied the fix advised on this forum, but the error has not re-appeared since [cool]

    Tuesday, July 8, 2008 1:30 PM
  • User-2045613807 posted

     

    Could you please explain which folders are still monitored and which are not?

    What would be the problem if I disable FCN completely? 

    Monday, July 21, 2008 7:25 AM
  • User-619846739 posted

    This blog post covers some of your FCN question: http://weblogs.asp.net/owscott/archive/2006/02/21/ASP.NET-v2.0-_2D00_-AppDomain-recycles_2C00_-more-common-than-before.aspx

    If you turn off FCN, it will mean that changes to your bin folder or web.config or app_ folders won't be picked up by ASP.NET.  You will need to do an app pool recycle in IIS for anything to be picked up.  It's possible to work this way, but it just requires that you manually take care of some things that would normally work for you.

    Scott

    Monday, July 21, 2008 2:54 PM
  • User1698715506 posted

    Well, it's been up for 12 hours now with no restarts, which leads me to believe the MS HotFix took care of the problem.  Before about the longest it could go was 3 hours or so.  This has been such a long, drawn out ordeal that I have a hard time believing it's finally over!  Time will tell, I guess.

    Here is what it is:

    Hot Fix for Microsoft Knowledge Base article number(s) 913393

    However, I can't find any information on it.  The file is password protected, and not yet publicly available.  If you contact Microsoft Technical Support, they should be able to set you up with a download.  Have not yet seen any side effects, but I am watchful.  I will post back if I encounter any problems.

    As far as contacting MS tech support, go to microsoft.com and look for support options.  I have support incidences included with my MSDN subscription, so I don't know if there is a cost.

     Hi ci2,

    Is this that hotfix that you mentioned above?

    http://support.microsoft.com/kb/913393

    Thanks.

    Wednesday, November 26, 2008 12:07 PM