Question

I have a WCF Web Service hosted in a Windows Service.

The service is configured using the following attributes (VB)

<ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple,
InstanceContextMode:=InstanceContextMode.PerCall,
UseSynchronizationContext:=False)>

I created a test client, which creates 50 threads at once and and I am starting them straight away, all querying an operation on the WCF Service. The first 30 or so openings (client.open()) work, but afterwards I get an error message on my client that the opening couldn't be done because there was a timeout while trying to open the service and thus I get an EndPointNotFoundException. (The operationss I am calling are all synchronous if that matters.)

Can I expect that sort of behaviour and thus simply have to live with these exceptions or do I have to look at some of my settings, either the above, or any other settings? (I am using a NetTcpBinding.)

What I see is that the client works on the request of the at once created threads simultaneously, so the above settings have the desired effect of making the service multi-user-at-the-same-time-enabled.

But ideally I wouldn't get timeout exceptions. Rather I would want the clients to wait longer to get their response than to time out.

Any ideas?

Thanks all!

Was it helpful?

Solution

Check settings such as these:

<behavior name="CommonServices_Behavior">
  <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="50"
   maxConcurrentInstances="50" />
</behavior>

I seem to recall that some of these values have defaults set in your machine.config file. There is also a MaxConnections value to check for NetTcpBinding.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top