【发布时间】:2013-09-26 07:28:24
【问题描述】:
我有一个带有 NetTcpBinding 的 WCF 服务,它与大约 100 个客户端一起运行。客户端定期从服务器轮询信息,一段时间后服务不再响应。
查看 netstat,我可以看到许多处于 CLOSE_WAIT 状态的连接。
这是我的绑定:
<netTcpBinding>
<binding name="default" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxConnections="10000">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</netTcpBinding>
我也尝试将 closeTimeout 的值从默认的 00:01:00 更改为 00:00:10,但没有任何效果。 p>
机器是 Windows Server 2008 R2 64bit。
更新:
我现在加了ServiceThrottlingBehavior,结果还是一样。
new ServiceThrottlingBehavior
{
MaxConcurrentCalls = 1000,
MaxConcurrentInstances = 1000,
MaxConcurrentSessions = 1000
};
更新2
我已将 SessionMode 设置为 NotAllowed 并将绑定更改为流式传输。
任何想法我可以做些什么来提高性能或找出问题?
【问题讨论】:
标签: wcf nettcpbinding servicehost