小编Nee*_*Pro的帖子

WCF listenBacklog和maxConnections不能设置为高于10.为什么不呢?

我的服务在低负载下运行良好.但是在高负载下我开始出现连接错误.

我知道其他设置,但我正在尝试更改listenBacklog参数,特别是我的TCP缓冲绑定.

如果我设置listenBacklog ="10",我可以telnet到运行我的WCF服务的端口.

如果我将listenBacklog更改为高于10的任何内容,它将不会让我在运行时telnet到我的服务.

似乎没有错误抛出.

我能做什么?
当我从10更改maxConnections时,我遇到同样的问题.绑定的所有其他属性我可以设置得更高而没有问题.

这是我的绑定看起来像:

 <bindings>
  <netTcpBinding>
<binding name="NetTcpBinding_IMyService" closeTimeout="00:01:00"
  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
  transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
  hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
  maxBufferSize="1048576" maxConnections="10" maxReceivedMessageSize="1048576">
  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
  <reliableSession ordered="true" inactivityTimeout="00:10:00"
    enabled="false" />
  <security mode="Transport">
    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign">
    </transport>
    <message clientCredentialType="Windows" />
  </security>
</binding>
...
Run Code Online (Sandbox Code Playgroud)

我真的需要增加maxConnections和listenBacklog的值

.net c# wcf

10
推荐指数
2
解决办法
8833
查看次数

标签 统计

.net ×1

c# ×1

wcf ×1