![](/img/trans.png)
[英]Question on the “ListenBackLog” parameter in WCF netTcpBinding
[英]WCF listenBacklog and maxConnections can't be set higher than 10. Why not?
我的服务在低负载下运行良好。 但是在高负载下我开始出现连接错误。
我知道其他设置,但我正在尝试更改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>
...
我真的需要增加maxConnections和listenBacklog的值
如果您在Win2000,XP,Vista或Win7计算机上运行,那么操作系统将限制为10个并发TCP连接。 尝试在Windows Server计算机上运行以进行确认。
这几乎肯定是一个限制问题。 尝试为服务限制行为值指定非默认值。 请参阅此页面以获取一些指导 。
尝试删除对HTTP绑定和MEX的所有引用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.