Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

.net

wcf

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

like image 549
NeedWCFPro Avatar asked May 20 '10 02:05

NeedWCFPro


1 Answers

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.

like image 134
Rich Turner Avatar answered Nov 15 '22 18:11

Rich Turner