![](/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.