Hello all,

I have a pure .NET (C# .net framework 3.5 [all latest updates installed]) Windows Service which listens for connections via UDP and TCP, queues messages, and then interacts via LDAP and Exchange Web Services to perform tasks. This includes a WCF listener which receives thousands of EWS messages per hour.

After a period of time, typically 3 hours, the service goes to 100% CPU usage, yet is still fully responsive and appears to be working just fine. I have logged metrics which show all the processes still performing as expected, sending responses to other devices as expected and without delay. If the task manager didn't show 100% CPU usage then I would be under the impression all was fine. Memory usage is not increasing.

At 100% CPU usage there are no individual threads maxed out, rather an ever changing (2-4) group of threads which, between them, add up to 100%. The percentage for each thread continually varies and the threads appear to end as expected.

I've built in the ability to kill individual class instances (all the main queues, udp and tcp listeners, plus the WCF server) at will, but doing this causes no difference. The service still runs at 100% CPU, fully responsive. Network load appears no different to the pre 100% CPU load.

I'm having a heck of a time finding out what is going on, especially as disposing of and recreating all the main class instances makes no difference.

If anyone could give me a nudge in the right direction to find the cause I'd be very grateful.

Many thanks.