Вопрос

We are getting the following error in the WCF tracelog.

The system hit the limit set for throttle 'MaxConcurrentSessions'. Limit for this throttle was set to 10. Throttle value can be changed by modifying attribute 'maxConcurrentSessions' in serviceThrottle element or by modifying 'MaxConcurrentSessions' property on behavior ServiceThrottlingBehavior

We couldn't find a good answer to modify the "MaxConcurrentSessions" attribute without using a custom binding on the WCF adapter.

looked at the following article but don't want to change the existing binding

http://msdn.microsoft.com/en-us/library/dd203050%28v=bts.10%29.aspx

One more point: working for a while, as we get the load, then everything locks up

Thanks, Krishna.

Это было полезно?

Решение

You don't mention which binding you are using, but am guessing that it is WCF-wsHttpBinding (basicHttpBinding doesn't support Sessions AFAIK).

I would suggest that you do switch to WCF-Custom, as it has more configuration options. Simply choose the binding type as wsHttBinding and it will work the same as the WCF-wsHttpBinding (we've configured all of our basic and wsHttp receive locations with Wcf Custom without any issues, FWIW)

You need to manually add the serviceThrottling behaviour on the behaviours tab of your receive location. From MSDN

Before any elements of the ServiceThrottlingBehavior service behavior can be modified, you must first add the serviceThrottling behavior extension to the Behaviors tab of the WCF-Custom* Transport Properties dialog box. To add serviceThrottling to the list of Behaviors, select the Behaviors tab of the WCF-Custom* Transport Properties dialog box, right-click ServiceBehavior under Behavior, click Add extension, select serviceThrottling, and then click OK. Then click to select the properties available under ServiceThrottlingElement and change the value for the properties as needed.

It is likely that you will also need to simultaneously increase the maxConcurrentCalls and maxConcurrentInstances as well.

The default recommendation in .NET 4 is at least 16*Cores, although the above link recommends >= 200 for maxConcurrentCalls.

That said, you may find BizTalk host throttling kicking in after a sustained period of heavy incoming load, which could cause the perceived lockup that you've described. Use WMI or perfmon counters to check the publishing and delivery throttling states of your hosts, and if this is the case, you will need to start the long haul in tuning your servers, hosts and orchestrations to avoid / limit the impact of throttling. BTS host throttling is fatal to synchronous receives like WCF, since response messages can be significantly delayed, causing the clients to timeout, and will also then cause the responses to be suspended once BTS does get around to processing them.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top