I have a Windows.NET.NET service written in C # that runs on Windows Server 2008, which when monitoring with PerfMon, apparently consumes 2500 pens per hour. The counter "Handle Count" rises all up.
When I look at handles using ProcExp with the option Show Show Descriptors and Mappings selected, the list lists thousands of event handlers and semaphores. Most seem unnamed. I looked at the source code and there are no explicit uses of AutoResetEvent or ManualResetEvent.
The private byte counter goes up and down. I did not watch this process for more than a couple of hours, but left it under surveillance overnight.
The service runs on a remote server, so I can’t connect the debugger directly and probably have to reset the process and analyze it using WinDBG or the like.
Is it possible to find one of the pens and find out what it points to and / or what can "own" it? If so, how?
In response to comments, a brief description of what the service does is provided here.
- contains some WCF services.
- contains an instance of the Quartz.NET scheduler
- places a queue of work items (quartz jobs press work items on a queue, and do not perform lengthy work)
- the executor of the working element is placed (the working elements are deserted by the timer and performed outside of quartz)
- hosted user cache manager (which runs a lot of ADO.NET)
source
share