.Net hosting - Memory gates checking failed

Discussion in 'General troubleshooting' started by Cralis, Mar 20, 2013.

  1. It seems Winhost have overloaded their resources for .net hosting, as I am constantly hitting the following error for a c# WCF service I have deployed:

    "Memory gates checking failed:

    The full exception I get when starting my service is:

    Memory gates checking failed because the free memory (327626752 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

    And my .Net stack trace reports:


    [InsufficientMemoryException: Memory gates checking failed because the free memory (327626752 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.]
    System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes) +58980
    System.ServiceModel.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity) +95
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +584


    I have tried recycling the app pool, but no joy. After an hour or so, it seems memory frees up, and the problem hides it's self... buit it back after a while. I notice it happens usually after I deploy a new version of the service.

    Anyone had this, or am I alone?
     
    Last edited by a moderator: Oct 14, 2015
  2. Yes. We are getting exactly the same error right now. Has taken two sites down.
     
  3. Can someone please fix this problem!

    Or at least send us some form of communication???
     
  4. Elshadriel

    Elshadriel Winhost Staff

    Which server are you guys on?
     
  5. We are on W11
     
  6. Elshadriel

    Elshadriel Winhost Staff

  7. Our site is not available now.
     
  8. ComputerMan

    ComputerMan Winhost Staff

    What did you change exactly? Can you undo the change to see if your site comes back up?
     
  9. I put the minPercentmemory attrib in the web.config on one service. That didn't work because I could get to the site. I put it back and I still can't get to the site.
     
  10. Seems to be working now.
     
  11. I am getting the same exact error and I have not changed my website in months....

    I have researched this error and if you go to the following link, it explains it.

    http://sapnep.com/dotnetblog/category/WCF.aspx

    I added the following right under the <system.servicemodel> tag.
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" />

    However, after trying it out, it still doesn't work.

    Can you please inform me how I can get my web service working again ASAP? It has to be on the hosting side where something was changed. I need to be informed of any changes I need to make to my config files, if any to get it going again.

    I am running my service in FULL TRUST mode.
     
  12. Did you read this?

    It's not something that in necessarily caused by a change in the server or your site. As you can see, the error is triggered by a percentage threshold. But 5% of the available memory on our servers is still hundreds of megabytes, so it isn't an issue of insufficient resources.
     

Share This Page