title: WCF service with Full Memory Error (Memory gates checking failed because the free memory) - How to resolve
body: <p>I have a WCF service host. My request from wc is high. My host, after a period of time exhibits a problem of memory is full. This problem is repeated. When I open the Web Service help page, this error is shown: </p>
  
  <blockquote>
    <p>Memory gates checking failed because the free memory (1398493184
    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.</p>
  </blockquote>
  
  <p>My web.config from the WCF host is as follows:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;behaviors&gt;
  &lt;serviceBehaviors&gt;
  &lt;behavior name=""&gt;
    &lt;serviceMetadata httpGetEnable="true"/&gt;
    &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
    &lt;serviceHostingEnvironment minFreeMemoryPercentageToActivateService="1"/&gt;
  &lt;/behavior&gt;
  &lt;/serviceBehaviors&gt;
  </code></pre>
  
  <p>and the host web.config is</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;bindings&gt;
  &lt;basicHttpBinding&gt;
  &lt;binding name="BasicHttpBinding_IPaperService" clouseTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisojnMode="StringWildcard" maxBufferSize="1000000000" maxBufferPoolSize="1000000000" maxReceivedMessageSize="100000000" messageEncoding="text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt;
  &lt;readerQuotas maxDepth="32" maxStringContentLength="1000000000" maxArrayLength="1000000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
    &lt;security mode="None"&gt;
    &lt;transport clientCredentialType="None" proxyCredentialType="None" realm=""/&gt;
    &lt;message clientCredentialType="UserName" algorthmSuite="Default" /&gt;
    &lt;security&gt;
  &lt;/binding&gt;
  </code></pre>
  
  <p>How can I solve my problem?</p>