Azure Websites AppDomain many reboots

I have a group of asp.net 4.0 sites running on Azure Websites

  • Computing Mode: Standard
  • Location: Northern Europe
  • Auto capacity tuning: off
  • Copy Size: Large
  • Number of copies: 1

The response time is very slow, the traffic is normal, but my log shows a lot of AppDomain disconnections (more than 3 per minute) . My sites load data into the cache during Application_Start to quickly respond to all requests with subsequences, but if Appdomains reboots every time, it is not possible to give an acceptable response time.

ShutdownReason Values:

  • ConfigurationChange
  • HostingEnvironment
  • CodeDirChangeOrDirectoryRename
  • BinDirChangeOrDirectoryRename
  • BrowsersDirChangeOrDirectoryRename

This does not make sense because I did not modify the file in these folders.

I tested one of these sites in free mode, which works very quickly and without an unexpected restart of AppDomain.

Thanks.

Update:

I included this code in Application_Start, no file changes were detected, and AppDomain rebooted again and again ...

var monitorPath = HostingEnvironment.MapPath("~/"); Application.Add("watcher", new FileSystemWatcher(monitorPath)); fsw = (FileSystemWatcher) Application["watcher"]; fsw.EnableRaisingEvents = true; fsw.IncludeSubdirectories = true; fsw.Changed += fsw_Changed; fsw.Created += fsw_Created; fsw.Deleted += fsw_Deleted; fsw.Renamed += fsw_Renamed; 

Update 15.07.2012:

using the code from ScottGu article http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx

I registered this:

 _shutDownMessage=Directory rename change notification for 'C:\DWASFiles\Sites\my-sitename\VirtualDirectory0\site\wwwroot'. File Change Notification Error in wwwroot HostingEnvironment initiated shutdown Change Notification for critical directories. File Change Notification Error in App_GlobalResources Change Notification for critical directories. File Change Notification Error in bin Change Notification for critical directories. File Change Notification Error in App_Browsers Change Notification for critical directories. File Change Notification Error in App_Code Change Notification for critical directories. File Change Notification Error in App_WebReferences CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change CONFIG change File Change Notification Error in C:\DWASFiles\Sites\my-sitename\VirtualDirectory0\site\wwwroot CONFIG change File Change Notification Error in HostingEnvironment caused shutdown File Change Notification Error in Change Notification for critical directories. File Change Notification Error in App_LocalResources Change Notification for critical directories. File Change Notification Error in App_LocalResources CONFIG change _shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand() at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace) at System.Web.HttpRuntime.OnCriticalDirectoryChange(Object sender, FileChangeEvent e) at System.Web.FileChangesMonitor.OnSubdirChange(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.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 

Update 07/19/2013:

The Data-In metric is very high and not related to the query metric, but when I set the parameter fcnMode = "Disabled", the data-B immediately to normal values ​​are consistent with the traffic.

+4
source share
1 answer

Using the new fcnMode parameter in asp.net 4.5 (seems to work in 4.0), AppDomain stops restarting

  <httpRuntime fcnMode="Disabled" /> 

But now the question is why FileChangesMonitor on azure sites (at least the sites in my subscription) gives this _shutDownMessage:

 File Change Notification Error in wwwroot HostingEnvironment initiated shutdown Change Notification for critical directories. File Change Notification Error in App_GlobalResources Change Notification for critical directories. File Change Notification Error in bin Change Notification for critical directories. File Change Notification Error in App_Browsers ... 

Update:

The reason was an error in the SMB, which affected only the location in Northern Europe.

+3
source

Source: https://habr.com/ru/post/1491119/


All Articles