TimeoutException when service says it was fine

I have a WCF service. I am calling this service from a WPF application.

Most of the time these calls go fine. But very rarely, they fail with a timeout exception.

I do about 20,000 calls a day to this service. And about 80 a day fail with this timeout exception (the timeout is set at 1 minute).

But if I check the logs for the service, it reports that everything went just fine. In fact it says it was really fast (less than a second).

Here is an example of the service times:

Start Time: 2016-11-11 09:40:09.170
End Time : 2016-11-11 09:40:09.270

And the timeout has this time stamp:

Exception : 2016-11-11 09:40:52.146

(I have checked that the generation of these time stamps are in sync.)

So the call goes out and completes in 100 milliseconds, but then 43 seconds later, the client says it timed out.

I am confused. I cannot reproduce this error in a controlled environment. So I am left looking at the logs for the errors.

Anyone have a idea of where I can go from here? Why would I get a timeout exception when the service says it did everything just fine?


In case it is relevant, here is the code I use to call my service:

    myResponse = await myService.Client.MyServiceCallAsync(serviceCallContract);
catch (Exception exception)
    errorMessage = HandleFaults(exception, isPreview, orderedTests);
    serviceCallFailed = true;
    myResponse = null;

myService.Client is an instance of the service client class generated from the WSDL.


i had same problem. i managed to solve it by adding this to my config file at server side:

  <add address="*" maxconnection="500" />

the default value is 2. for more information you can read this: scale up WCF service


 ? TimeoutException when service says it was fine
 ? TimeoutException when service says it was fine
 ? TimeoutException when TransferMode=Streamed
 ? Web service method call times out, metadata request works fine
 ? OperationContext.Current is null after first await when using async/await in WCF service
 ? WCF can return single object just fine but fails when returning a list
 ? WCF cannot add service due - cannot obtain meta data
 ? WCF service with Windows authentication throws exception "Username not defined" even if it is defined
 ? Windows network authentication the right way
 ? Windows network authentication the right way