加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

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

发布时间:2020-12-16 00:41:25 所属栏目:asp.Net 来源:网络整理
导读:我有一个WCF服务主机。我的请求来自wc很高。我的主持人,经过一段时间的展示,记忆力充沛。这个问题重复。当我打开Web Service帮助页面时,会显示此错误: Memory gates checking failed because the free memory (1398493184 bytes) is less than 5% of tot
我有一个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所示

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读