2

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, Func1 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?

  • try to remove cache and temp data from your PC it always causes because of slow RAM of small amount of ROM available – Syed Muhammad Munis Ali Jan 17 '18 at 09:59
  • 1
    This isn't on my PC. As I stated it's on an Azure web app. – George Roberts Jan 17 '18 at 16:24
  • @GeorgeA.RobertsIV the error is puzzling. Can you share your web app name, either directly or [indirectly](https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly)? This will help us investigate. Thanks! – David Ebbo Jan 17 '18 at 17:48
  • @GeorgeA.RobertsIV also, please confirm that you are still seeing this, and provide the UTC time of one sample occurrence of the error (to help us correlate logs). – David Ebbo Jan 17 '18 at 17:49
  • @George A. Roberts IV I suspect platform issue, but we'll need the data David Ebbo requested to RCA. – kreinsch Jan 17 '18 at 18:23
  • @DavidEbbo Thanks for offering to look ... I led myself down a rabbit hole with this one. When I started searching for it I saw a bunch of things saying that it could be a memory issue so I started looking into processes in my app and how much memory they were using. I streamlined a bunch of stuff to reduce memory footprint (yay!) but it still didn't help ... in the end, it actually WAS a space issue. My App was at the quota. And thus I am reminded of Occam's razor. Thanks again. – George Roberts Jan 17 '18 at 22:52
  • @GeorgeRoberts glad you figured it out! I had to look up 'Occam's razor', and I see how it applies :) – David Ebbo Jan 18 '18 at 03:12
  • @DavidEbbo OK, I must have spoken too soon ... I've been getting the error again but according to my quotas page I'm only using 41.11 GB of the 50 GB quota. Any thoughts? http://dummy1973.azurewebsites.net/ ... I can give you more details on which app and URL, etc. privately if you tell me how you want it sent. – George Roberts Jan 25 '18 at 17:23
  • @GeorgeRoberts I may not be able to look till tomorrow, but I'll put on my list – David Ebbo Jan 25 '18 at 17:25
  • @GeorgeRoberts point of the dummy site technique is to remove the need for sharing details privately (see the link I posted above). Here, there are 6 candidate apps (including slots when are basically separate apps). BTW, note that the 50 GB quota is per App Service Plan and not Per App. Could it be that you you have one app taking 41 GB, and the rest used by the other apps/slots? – David Ebbo Jan 27 '18 at 01:43
  • @DavidEbbo Sorry about that. Starts with o, ends with l and is 9 characters long. Nuget.Server in question is in /nuget – George Roberts Jan 27 '18 at 06:29
  • Oh and yes the 41GB was for the whole app service plan. – George Roberts Jan 27 '18 at 06:31
  • Yes, there does seem to be disk space left. Is this an error that you get on site start, or randomly later? It would also be interesting to check whether when you get it, all 5 of your workers hit it or just one. – David Ebbo Jan 30 '18 at 01:15
  • Restarting actually usually clears it ... but sometimes it happens again fairly quickly. I just tried it and its throwing the error now. I actually ended up standing up another web app and installing Nuget Gallery on it because our teams were stopped due to the Nuget.Server error. – George Roberts Jan 30 '18 at 05:15
  • I had a similar problem, this actual prblem in my case was the handle count being too large (see [this question](https://stackoverflow.com/questions/51177880/iis-app-pool-recycle-triggers-not-enough-storage-is-available-to-complete-this) for details how to investigate this issue.) – Derk Van Lochem Jul 04 '18 at 15:53

1 Answers1

0

Can you try using a singleton for your Tracer (EnvSettings.SettingsUtils.Trace)?