asp.net – 具有完全内存错误的WCF服务(内存门检查失败,因为可用内存) – 如何解决

前端之家收集整理的这篇文章主要介绍了asp.net – 具有完全内存错误的WCF服务(内存门检查失败,因为可用内存) – 如何解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个WCF服务主机。我的请求来自wc很高。我的主持人,经过一段时间的展示,记忆力充沛。这个问题重复。当我打开Web Service帮助页面时,会显示错误

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.

我的WCF主机的web.config如下:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
  <serviceMetadata httpGetEnable="true"/>
  <serviceDebug includeExceptionDetailInFaults="false"/>
  <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="1"/>
</behavior>
</serviceBehaviors>

和主机web.config是

<system.serviceModel>
<bindings>
<basicHttpBinding>
<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">
<readerQuotas maxDepth="32" maxStringContentLength="1000000000" maxArrayLength="1000000000" maxBytesPerRead="4096" maxNaMetableCharCount="16384" />
  <security mode="None">
  <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
  <message clientCredentialType="UserName" algorthmSuite="Default" />
  <security>
</binding>

我如何解决我的问题?

解决方法

请尝试在wCF主机的yourweb.config中将minFreeMemoryPercentageToActivateService设置为0,如 this answer所示
原文链接:https://www.f2er.com/aspnet/252940.html

猜你在找的asp.Net相关文章