System.ServiceModel.ServerTooBusyException [英] System.ServiceModel.ServerTooBusyException

查看:74
本文介绍了System.ServiceModel.ServerTooBusyException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到以下异常


Exception  Type        = System.ServiceModel.ServerTooBusyException
Exception Message      = The HTTP service located at http://localhost:9090/MABatchService.svc is too busy.
Exception Source       = mscorlib
Exception  Stack Trace =
Server stack trace:
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at MA.MAServices.MAServiceInterface.IMABatchService.IsValidUser(UserAuthMessage request)
   at Assurety.BatchTool.ClientLibrary.BatchProcess.IsValidUser()
Exception  Type        = System.Net.WebException
Exception Message      = The remote server returned an error: (503) Server Unavailable.
Exception Source       = System
Exception  Stack Trace =    at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

推荐答案

根据您的负载要求配置WCF限制。有关此配置的更多信息,请参见此处,

Configure the WCF throttling according to your load requirements. More information about this configuration can be found here,

http:// www。 danrigsby.com/blog/index.php/2008/02/20/how-to-throttle-a-wcf-service-help-prevent-dos-attacks-and-maintain-wcf-scalability/

建议:

如果您的InstanceContext设置为"PerCall"你应该将maxConcurrentSessions和maxConcurrentCalls设置为相同的值,因为每次调用都是它自己的会话。 您应该将此值定位为至少25-30。 但是,您不应该需要
来超过64。

If your InstanceContext is set to "PerCall" you should set maxConcurrentSessions and maxConcurrentCalls to the same value since each call is its own session.  You should target this value to be at least 25-30.  However you shouldn’t need to go higher than 64.

如果您的InstanceContext设置为"PerSession",那么你应该将maxConcurrentCalls设置为至少25-30。 您的maxConcurrentSessions应该是您希望同时连接的用户数。

If your InstanceContext is set to "PerSession" you should set maxConcurrentCalls to be at least 25-30.  Your maxConcurrentSessions should be the number of users you want to have concurrently connected.

如果您的InstanceContext设置为"Single",那么您应该使用与"PerSession"相同的设置,但maxConcurrentSessions仅在会话支持处于活动状态时才适用(这是使用

ServiceContractAttribute
)。

If your InstanceContext is set to "Single" you should use the same settings as "PerSession", but the maxConcurrentSessions will only apply if session support is active (this is set with the SessionMode attribute on the ServiceContractAttribute).

是否可以启用WCF跟踪和查看实时例外。

Can you enable WCF tracing and see the real time exception.








这篇关于System.ServiceModel.ServerTooBusyException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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