Analysing log files I’ve noticed that ~1% of service calls ended with TimeoutException on the Silverlight client side.
The services (wcf) are quite simple and do not perform long computations.
According the log all calls to the services are always processed in less that 1 sec (even when TimeoutException is occurred on the client!), so it is not server timeout.
So what is wrong? Can it be configuration or network problem? How can I avoid it?
What additional logging information can be helpful for localizing this issue?
The only one workaround I’ve thought up is to retry service calls after timeout.
I will appreciate any help on this issue!
Update: On startup the application performs 17 service calls and 12 of them simultaneously (may it be cause of failure?).
Update: WCF log has not contained useful information about this issue. It seems some service calls do not reach the server side.
The problem is in maximum number of concurrent connections to a single server in Internet Explorer 7/6. It is only 2! http://msdn.microsoft.com/en-us/library/cc304129(VS.85).aspx
If we have 3 (for ex.) concurrent service calls two of them will be sent to server immediately but the third will be waiting in queue. Also the send timer (corresponded to
sendTimeout) is running when request is in queue. If the first two service requests will be running for a long time then the third will generate TimeoutException though it wasn’t sent to the server (and we won’t see any information about this request on the server side and cannot catch it with Fiddler…).In more real situation if we have about 12 concurrent calls and default 1 min send timeout and if service calls process more than 10 seconds in average than we can easily get timeout exception with the last two calls (12 / 2 * 10 sec = 60 sec) because they will wait all others.
The solution is:
sendTimeoutvalue in client config.In my case I’ve done 1-3 things and that was enough.
Here is my implementation of auto retry feature:
And here is a usage:
Hope this will be helpful.