Service
I have WCF service under high load. Response time is averaging ~60 ms. Service uses mostly default configuration, except of maxConcurrentCalls="5000", endpoint with basicHttpBinding is exposed.
Client
Another service (further "client") is consuming this one. Infrequently (like 0.5%) there are TimeoutExceptions (*). sendTimeout on client is set to "00:00:05".
Load Test
I can reproduce same with VS Load Testing:
[TestMethod] public void Test() { using (var client = new SomeServiceClient()) { // some randomization to make request more realistic var response = client.GetSomething(request); } } Timeouts disappear when:
- I increase sendTimeout.
- I create one channel and reuse it during whole load testing.
Now weird stuff:
Load test (even when there are timeouts) shows test time averaging 0.06, and at maximum taking 0.2 second, which is by far lower than 5 seconds. This also happens in production (logs say so), but no customer impact identified so far.
Question
Does anybody have any idea what could be wrong?
Alternatively: what would you suggest for this scenario in terms on WCF configuration/instancing/etc?
As of scalability all this stuff is already running on many hosts: client on 4 hosts, service as well on 4 hosts. Would increase in number of clients help here?
(*) When I refer to TimeoutExceptions I always mean client side exceptions.
System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:05. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'http://someservice.intranet/99.99/someendpoint.svc' has exceeded the allotted timeout of 00:00:05. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out
Any WCF gurus willing to help?