简体   繁体   English

对WCF服务的多个异步调用上的System.OutOfMemoryException

[英]System.OutOfMemoryException on multiple asynchronous calls to a WCF service

I have a windows service that is executing multiple asynchronous calls to a WCF service simultaneously (using a Parallel.Foreach loop). 我有一个Windows服务,该服务正在同时执行对WCF服务的多个异步调用(使用Parallel.Foreach循环)。

The WCF service is generating multiple System.OutOfMemory exceptions. WCF服务正在生成多个System.OutOfMemory异常。

Is there something I need to configure for multithreading to run successfully? 我需要配置一些东西才能使多线程成功运行吗? I was of the understanding that IIS managed the threading resources.. I believe my understanding is incorrect. 我的理解是IIS管理了线程资源。我相信我的理解是不正确的。

Any help would be gratefully received. 任何帮助将不胜感激。

Add that to your web.config: 将其添加到您的web.config中:

<bindings>
  <basicHttpBinding>
    <binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
      <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>
  </basicHttpBinding>
</bindings>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM