Monday, November 3, 2014

Memory gates checking failed because the free memory is less than 5% of total memory

I got this exception when running a service on my localhost:

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

 I checked memory usage in task manager and the free memory was indeed less than 5%.

Easy fix for this issue is to set "minFreeMemoryPercentageToActivateService" value in "serviceHostingEnvironment" configuration to 0:

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0"/>
</system.serviceModel>

No comments:

Post a Comment