简体   繁体   中英

WCF listenBacklog and maxConnections can't be set higher than 10. Why not?

My service works great under low load. But under high load I start to get connection errors.

I know about other settings but I am trying to change the listenBacklog parameter in particular for my TCP Buffered binding.

If I set listenBacklog="10" I am able to telnet into the port where my WCF service is running.

If I change listenBacklog to anything higher than 10 it will not let me telnet into my service when it is running.

No errors seem to be thrown.

What can I do?
I get the same problem when I change my maxConnections away from 10. All other properties of the binding I can set higher without a problem.

Here is what my binding looks like:

 <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>
...

I really need to increase the values of maxConnections and listenBacklog

If you're running on a Win2000, XP, Vista or Win7 machine, then the OS is limiting you to 10 concurrent TCP connections. Try running on a Windows Server machine to confirm.

This is almost certainly a throttling issue. Try specifying non-default values for the service throttling behavior values. See this page for some guidance .

尝试删除对HTTP绑定和MEX的所有引用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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