I'm running an ASP.NET MVC app (4.6.1) hosting Nuget.Server on an Azure App Service under a sub application. It's been working fine for weeks ... all of a sudden I'm getting the following:
Server Error in '/nuget' Application. Not enough storage is available to complete this operation Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: Not enough storage is available to complete this operation
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): Not enough storage is available to complete this operation]
System.Diagnostics.Eventing.EventProvider.EtwRegister() +6148507
System.Diagnostics.Eventing.EventProvider..ctor(Guid providerGuid) +64 Microsoft.Web.Hosting.Tracing.EventProviderVersionTwo..ctor(Guid id) +62 Microsoft.Web.Hosting.Tracing.AntaresEventProvider..cctor() +161[TypeInitializationException: The type initializer for 'Microsoft.Web.Hosting.Tracing.AntaresEventProvider' threw an exception.]
Microsoft.Web.Hosting.Tracing.AntaresEventProvider.EventWriteDWASGenericLog(String LogStatement, String SiteName) +27
EnvSettings.SettingsUtils.Trace(String format, Object[] args) +122
EnvSettings.SettingsProcessor.Start() +204[InvalidOperationException: 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..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func
1 setHostingEnvironmentCultures) +849
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +162
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +130
System.Web.Compilation.BuildManager.ExecutePreAppStart() +170
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +734[HttpException (0x80004005): 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..] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +708
I'm at a loss to understand what's going on. I thought based upon searches that it might be a memory issue but each instance is only using between 1-2GB of the 7GB.
The main site and two other sub applications are working fine. It's just this one sub application.
It looks like it possibly has something to do with events and tracing but tracing is turned off for the app in Azure so I'm not sure why it would be doing any tracing.
Anyone have any thoughts?
Can you try using a singleton for your Tracer (EnvSettings.SettingsUtils.Trace)?
I had a similar problem, this actual prblem in my case was the handle count being too large (see this question for details how to investigate this issue.)
User contributions licensed under CC BY-SA 3.0