在服务器资源紧张内存少于5%WCF会出现如下错误信息:

Memory gates checking failed because the free memory (39424000 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.

 

解决办法:打开web.config,找到configuration/system.serviceModel/serviceHostingEnvironment节点,加入minFreeMemoryPercentageToActivateService=”0″,即可0-5,即为0%-5%

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0" />