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?
You might also want to take a look at this link and make sure you are running your application in 'Full' trust: http://stackoverflow.com/questions/...hen-using-wcf-to-run-query-against-sql-server
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.
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.
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.