WCF timeout exception on calling service on 11th time
Posted
by Sergej Andrejev
on Stack Overflow
See other posts from Stack Overflow
or by Sergej Andrejev
Published on 2010-04-01T13:10:10Z
Indexed on
2010/04/01
13:13 UTC
Read the original article
Hit count: 637
wcf
I'm creating a WCF service and stumbled with request timeout problem. When I load test the service the 11th call always fails with "System.Net.WebException: The operation has timed out". I have read that would happen if serviceThrotling is set to defaults so I added following lines to my service configuration file
<behavior name="ServiceBehavior">
<!-- ... -->
<serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" />
</behavior>
But this doesn't help. I thought that closing the proxy might be a problem, but I do close all proxies.
try
{
response = service.GetCustomerHdQuotes(request);
}
finally
{
try
{
if (service.State != CommunicationState.Faulted)
service.Close();
else
service.Abort(); // Abort if the State is Faulted.
}
catch (Exception)
{
service.Abort();
}
}
I also have an idea that inside service some resources pile up preventing service to accept new connections, but the fact that this is always 11th request points that this is more likely due to some configuration problems.
Can anybody help me with that?
© Stack Overflow or respective owner