I am building an asp.net application, using II6 on windows server 2003 (vps hosting). I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit).
When my wcf service tries launching my query running against a local sql server this is the error I receive:
Memory gates checking failed because the free memory (43732992 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 ideas??
In your web.config, in your configuration\system.serviceModel\serviceHostingEnvironment element, add a minFreeMemoryPercentageToActivateService attribute, and set it to something lower than 5, I set mine to 0, and this error went away for me.
ex:
<configuration>
<system.serviceModel>
<serviceHostingEnvironment ... minFreeMemoryPercentageToActivateService="0" />
</system.serviceModel>
</configuration>
Caution via MSDN: "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."
One thing you could try is changing your 'mex' service path to absolute if it is not already. It worked for me once. But that could have been due to the service restarting and freeing some memory.
BrainSlug's Answer has an example of how to do this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With