Sites da Azure AppDomain muitas reinicializações
Eu tenho um grupo de sites asp.net 4.0 em execuçãoWeb sites do Azure
Modo de cálculo: padrãoLocalização: Norte da EuropaAutoescala de capacidade: desativadoTamanho da instância:amplaContagem de instâncias: 1O tempo de resposta é muito lento, o tráfego é normal, mas o meu log mostra muitosDesligamentos do AppDomain (mais de 3 em um minuto). Meus sites carregam dados no cache durante o Application_Start para dar uma resposta rápida a todas as solicitações subsequentes, mas se o Appdomains for reiniciado toda vez, será impossível fornecer tempos de resposta aceitáveis.
oShutdownReason valores são muitos:
ConfiguraçãoAlterarHostingEnvironmentCodeDirChangeOrDirectoryRenameBinDirChangeOrDirectoryRenameBrowsersDirChangeOrDirectoryRenameIsso não faz sentido porque eu não mudei nenhum arquivo nessas pastas.
Eu testei um desses sites em um modo livre executando muito rápido e sem nenhuma reinicialização inesperada do AppDomain.
Obrigado.
Atualizar:
Eu incluí esse código no Application_Start, nenhuma alteração de arquivo foi detectada e o AppDomain está sendo reiniciado novamente e novamente ...
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;
Atualização de 15/07/2013:
usando o código do artigo do ScottGuhttp://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx
Eu registrei isto:
_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()
Atualização de 19/07/2013:
A métricaData-In é muito alto e não tem relação com a métrica de pedidos, mas quando eu configuro a configuração fcnMode = ”Desativado” os dados - In imediatamente para valores normais de acordo com o tráfego.