简体   繁体   中英

Increase the maximum number of outgoing requests in WCF Application

I have a WCF Application with two endpoints and five web services. In order to authenticate my WCF Application, a call is made to another web service. After authentication my application calls another web service, depending on the type of request. The issue is that for each incoming request my WCF Application calls at least two different web services. The recent number of incoming requests increased and caused the consumer to receive a Timeout error. My CPU utilization barley reached 10%. I've increased the maxconnection attribute in my Web services.

I separated my endpoints to two web sites. It increased the throughput to be processed ( and it almost solved the Timeout problem). However, I guess that there is a limit on the outgoing requests on IIS for each web site. If there is, what is it, and how can I increase it?

Note: I have another problem here and i guess both these problems Originating from one thing.

Maybe changing the ConcurrencyMode of your WCF service can help you. Just add the attribute to your service behavior. You will have to make sure that your code is thread-safe though, since this will make your application multi-threaded.

[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
public class MyService : IMyService
{
    // Implementation
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM