Friday, December 9, 2011

WCF Delay when making multiple calls

We were having an issue with a delay that would only surface occasionally. I tracked it down to a service we have that holds the connection open until it has something to send to the client or 15 seconds and it sends a heartbeat back.
Every so often things would stop responding. I tracked it down to be occurring only while we were waiting for the blocking call to return. This did not happen all the time but we could repo it regularly by using the app.

I did a google search as always and found a wcf setting called MaxConnections. So I put it in and changed the value to 100. Tested it and voila!

We had some helper classes that would open connections and keep the services alive (inContact.WCFConnector)

http://msdn.microsoft.com/en-us/library/wcf.maxconnections(v=bts.10).aspx

system.net>>>connectionManagement>>>add address = "*" maxconnection = "100" />