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所示

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....