wcf asynchronous concurrent call raised timeout exception

By : xavier
Source: Stackoverflow.com
Question!

I am making 10 concurrent asynchronous WCF service call from a SilverLight application using multiple threads at the same time.

The WCF service will take 30 seconds to process each call from the client.

When the third thread makes a call to WCF server it gives timed out exception. When I change the send timeout configuration to 10 minutes, it is working fine for all threads.

So my confusion is, is WCF considering the timeout configuration for all the concurrent calls commonly. Please note that I am using basic HTTP binding.

By : xavier


Answers
It sounds like there is only a single service instance processing your calls. This would happen if (as you say in comments) you have per-session instancing and concurrency set to single.

The calls are treated as belonging to the same client session, and so they are being queued and processed in turn by a single threaded, single service instance. So any requests which don't get dispatched before the client timeout are failed.

You should set the instancing to per-call, this will mean that you will get a service instance per request, so all 10 calls should be processed concurrently.

See https://msdn.microsoft.com/en-us/library/ms731193(v=vs.110).aspx



This video can help you solving your question :)
By: admin