At my client site lately, I’ve seen this exception logged in the Event Viewer, sent by IIS when web services attempt to start:
“Memory gates checking failed because the free memory (xxxx bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests.”
Here’s how to fix the problem. In the web.config file for the service, find the serviceHostingEnvironment element and add the following attribute:
minFreeMemoryPercentageToActivateService=”0″
Here’s what the documentation says about the attribute: “An integer that specifies the minimum amount of free memory that should be available to the system, before a WCF service can be activated. Caution: Specifying this attribute along with partial trust in the web.config file of a WCF service will result in a SecurityException when the service is run.”