WCF中的服务太忙错误 [英] Service too busy error in WCF

查看:19
本文介绍了WCF中的服务太忙错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 .Net WCF 服务中间歇性地收到以下异常."位于 http://MyServer/TestWCF/MyService.svc 的 HTTP 服务太忙."

I intermittently get the following exception in my .Net WCF Service. "The HTTP service located at http://MyServer/TestWCF/MyService.svc is too busy."

我在这里遗漏了什么吗?

Am I missing something here?

我使用基本的 http 绑定并启用了 WCF 限制.

Am using basic http binding and have enabled WCF throttling.

<basicHttpBinding>
        <binding name="BasicHttpBinding_MyService" maxReceivedMessageSize="2147483647"
                 messageEncoding="Text" textEncoding="utf-16" sendTimeout="00:01:00" >
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="163840000"
                        maxDepth="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
        </binding>

....

<behavior name="MyWCFServices.MyServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling
                    maxConcurrentCalls="16"
                    maxConcurrentInstances="2147483647"
                    maxConcurrentSessions="10"/>
        </behavior>

节流会帮助解决问题吗?另外,我可以知道高流量网站的节流推荐参数值吗?

Will throttling help resolving the issue? Also,may i know the recommended parameter values for throttling for a high traffic web site?

推荐答案

您绝对可以尝试将服务节流行为中的 maxConcurrentSessionsmaxConcurrentCalls 增加到标准值大约 30 次,看看这是否会使错误消失.服务器太忙似乎表明传入的请求数量超过了您的服务限制行为所允许的区域,并且由于在给定的超时时间内没有服务实例可用于为它们提供服务,因此它们已被丢弃.

You could definitely try to increase the maxConcurrentSessions and maxConcurrentCalls in your service throttling behavior to the standard values of 30 or so and see if that makes the error go away. Server too busy would seem to indicate that more requests have come in than area allowed by your service throttling behavior, and they've been discarded since no service instance became available to service them within the given timeout period.

这篇关于WCF中的服务太忙错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆