Derk Van Lochem
Derk Van Lochem

Reputation: 90

IIS App Pool Recycle triggers: Not enough storage is available to complete this operation (Azure App Service)

I am running an ASP.Net Website on an Azure App Service which hangs pretty much every time an App Pool Recycle takes place.

I've checked, the available storage, I am using approx 5 out of 50 Gb so that should not be the problem.

See the stacktrace below. Does anyone have an idea? I've asked this question to Microsoft Support, they could not answer this one :-(

Worst case scenario, can I prevent the System.Diagnostics.Eventing.EventProvider.EtwRegister() call?

Help on this one would be very much appreciated!

Exception message: The pre-application start initialization method Start on type EnvSettings.SettingsProcessor threw an exception with the following error message: The type initializer for 'Microsoft.Web.Hosting.Tracing.AntaresEventProvider' threw an exception..
   at System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
   at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

The type initializer for 'Microsoft.Web.Hosting.Tracing.AntaresEventProvider' threw an exception.
   at Microsoft.Web.Hosting.Tracing.AntaresEventProvider.EventWriteDWASGenericLog(String LogStatement, String SiteName)
   at EnvSettings.SettingsLogger.Trace(String format, Object[] args)
   at EnvSettings.SettingsProcessor.Start()

Not enough storage is available to complete this operation
   at System.Diagnostics.Eventing.EventProvider.EtwRegister()
   at System.Diagnostics.Eventing.EventProvider..ctor(Guid providerGuid)
   at Microsoft.Web.Hosting.Tracing.EventProviderVersionTwo..ctor(Guid id)
   at Microsoft.Web.Hosting.Tracing.AntaresEventProvider..cctor()

Image of Mem and CPU usage. App Pool Recycled at July second and third

Upvotes: 1

Views: 1119

Answers (1)

Derk Van Lochem
Derk Van Lochem

Reputation: 90

At the end the problem indeed was the handle count being too large to handle for IIS. Investigation pointed out that the File Cache implementation of the Imagprocessor (http://imageprocessor.org) was causing this problem.

  • You can see how many handles your App Service in the metrics section at your Azure Portal
  • You can find the details at https://[your-app-service].scm.azurewebsites.net. Go to Process Explorer -> Select properties of w3wp.exe -> Select Handles Tab

Upvotes: 1

Related Questions