WCF web service error: Memory gates checking failed because the free memory (xxxxxxxxxx bytes) is less than 5% of total memory.

Programming, error messages and sample code

When browsing to a WCF web service, you may receive an error such as “Memory gates checking failed because the free memory (373817344 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests.”

In order to resolve this, you need to edit the web.config file for the WCF web service.

  • Open the web.config file from Control Panel--->Files
  • Find the existing line that says this:
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  •  Edit the existing line to say this:
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0" />
  • Save the changes you have made to the Web.config file. By this way, it should solve such issue.