We have a C# (.Net 4.0) console application that "self hosts" two WCFs services: one used WSHttpBinding, and another uses BasicHttpBinding.
Connecting to these services, we have two separate client applications: a Silverlight-based service that uses the BasicHttpBinding, and another console app that uses the WSHttpBinding.
The WCF service app usually has around 30 users connected via the Silverlight client, and another couple of connections from the console application client. It's not "flat out" by any means; each client queries the WCF service maybe once every 5 seconds at the very most.
The problem is: intermittently the service application becomes unresponsive. Although the server itself continues to run (it continues to write to a log file), all WCF activity (on both ServiceHosts) appear to "seize". New requests aren't processed (although the TCP connections are accepted). Also, the number of threads consumed by the application starts to ramp up dramatically, at the rate of around one new thread per second. The code itself doesn't do anything with Threads or ThreadPools, although it occasionally will issue a Thread.Sleep for a few hundred milliseconds.
The frustrating thing is the intermittent nature of the problem: the code regularly runs for hours, even days without any issues. Then, with no apparent cause, it suddenly becomes unresponsive and the Thread count starts ticking up.
I've tried simulating user activity - connecting and disconnecting clients, "swamping" the service with requests - but I can do nothing to reproduce the fault.
Just in case the issue was WCF Throttling, I've added this code:
ServiceThrottlingBehavior throttlingBehavior = new System.ServiceModel.Description.ServiceThrottlingBehavior
{