解决WCF接口超时无响应 最大连接数问题
2012-01-06 14:38
399 查看
本文转自:/article/5853944.html
如果WCF接口代码操作时间比较费时,那么当连接数占满时,新的请求将会返回超时错误,请参考以下代码,加在wcf host主机配置文件内
<serviceBehaviors>
<!--
maxConcurrentCalls - 服务中同时存在的最大活动消息数,默认值为 16
maxConcurrentInstances - 服务中同时存在的InstanceContext的最大数量,默认值为26
maxConcurrentSessions - 服务中同时存在的最大会话数,默认值为 10
-->
<behavior name="h.SOA.E**.Service1Behavior">
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="1000" maxConcurrentInstances="50000" />
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
<behavior name="h.SOA.E**.EsalesServiceBehavior">
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="1000" maxConcurrentInstances="50000" />
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
如果WCF接口代码操作时间比较费时,那么当连接数占满时,新的请求将会返回超时错误,请参考以下代码,加在wcf host主机配置文件内
<serviceBehaviors>
<!--
maxConcurrentCalls - 服务中同时存在的最大活动消息数,默认值为 16
maxConcurrentInstances - 服务中同时存在的InstanceContext的最大数量,默认值为26
maxConcurrentSessions - 服务中同时存在的最大会话数,默认值为 10
-->
<behavior name="h.SOA.E**.Service1Behavior">
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="1000" maxConcurrentInstances="50000" />
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
<behavior name="h.SOA.E**.EsalesServiceBehavior">
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="1000" maxConcurrentInstances="50000" />
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
相关文章推荐
- 解决WCF接口超时无响应 最大连接数问题
- 解决WCF接口超时无响应 最大连接数问题
- 解决超过最大连接数问题
- 在从池中获取连接之前超时时间已过,所有池连接都已被使用并已达到最大池大小的问题解决方法
- 解决远程桌面连接Windows Server 2003时提示“终端服务器超出了最大允许连接数”的问题
- 解决HttpURLConnection setConnectTimeout超时无响应的问题
- VS2010 WCF 远程服务器返回了意外响应: (400) Bad Request等问题解决方案
- 解决Windows服务器最大终端连接数问题
- Oracle超出最大连接数问题及解决
- 解决HttpURLConnection setConnectTimeout超时无响应的问题
- 解决windows远程(Telnet)最大连接数的问题
- 解决Windows服务器最大终端连接数问题
- 请Artech,dudu 帮忙解答下: WCF 服务返回的如果是接口(remoting有个远程对象封送),(感觉比较难以解决的问题)
- Oracle超出最大连接数问题及解决
- 解决XP在网络中最大共享连接数的问题
- windows2003 “终端服务器超出了最大允许连接数”这个问题 解决办法
- 解决WCF调用多次之后没有响应的问题 转
- 解决WCF接口无法传递object参数的问题
- Oracle超出最大连接数问题及解决 2
- 解决R12中FND-凭证打印请求飘黄:OPP响应超时的问题