[英]WCF is getting timed out with socket exception
I have written a WCF service with NetTcp Binding. 我已经用NetTcp Binding编写了WCF服务。
<bindings>
<customBinding>
<binding name="CustomNetTcpBinding" closeTimeout="00:01:00" openTimeout="00:03:00" receiveTimeout="00:15:00" sendTimeout="00:15:00">
<transactionFlow />
<gZipMessageEncoding enableCompression="true" innerMessageEncoding="textMessageEncoding">
<readerQuotas maxDepth="999999999" maxStringContentLength="999999999" maxArrayLength="999999999" maxBytesPerRead="999999999" maxNameTableCharCount="999999999" />
</gZipMessageEncoding>
<windowsStreamSecurity />
<tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>
<netTcpBinding>
<binding name="TcpAuthWindows" closeTimeout="01:01:00" openTimeout="01:10:00" receiveTimeout="01:10:00" sendTimeout="00:10:00" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="21474836470" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" algorithmSuite="Default" />
</security>
</binding>
</netTcpBinding>
</bindings>
I have hosted my WCF service on IIS. 我已经在IIS上托管了WCF服务。
Service is working fine till 105 concurrent calls after that it start giving me socket error as mentioned below... 服务正常工作,直到有105个并发调用,之后它开始给我套接字错误,如下所述...
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '01:09:59.1099110'.
I have written my test case as per http://blogs.msdn.com/b/endpoint/archive/2011/05/04/wcf-scales-up-slowly-with-bursts-of-work.aspx
我已经按照
http://blogs.msdn.com/b/endpoint/archive/2011/05/04/wcf-scales-up-slowly-with-bursts-of-work.aspx
编写了测试用例
My questions are... 我的问题是...
THanks in advance. 提前致谢。
WCF will Queue requests when the limit of conncurrent requests is reached. 当达到并发请求的限制时,WCF将使请求排队。
It is not possible to Ensure that no request will fail, but you can reduce the chance that it will happen. 无法确保没有任何请求失败,但是可以减少发生请求的机会。 For example the Client has a timeout, the Queue for Processing has a timeout.
例如,客户端有一个超时,处理队列有一个超时。
For details on which parameters you can configure see: 有关可以配置哪些参数的详细信息,请参见:
http://weblogs.asp.net/paolopia/wcf-configuration-default-limits-concurrency-and-scalability http://weblogs.asp.net/paolopia/wcf-configuration-default-limits-concurrency-and-scalability
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.