In this article I want to talk about a problem that I have encountered with a Microsoft Windows Server 2008 running IIS (Internet Information Services). For those that do not know what IIS is, it’s a service used by Microsoft servers to host websites. I’ve worked with IIS for a while now and I can tell you that it’s getting better and better. I’ve also worked with IIS 8 on Windows Server 2012 and I can definitely say that it has some real improvements. If you want to learn more about IIS, check out the IIS articles from IT training day.
I’ve discovered this problem when some clients complained of poor performance from an IIS application. Immediately I checked the system performance for hardware usage. Everything looked in order so I’ve checked Event Viewer, Task Manager and also added some perf counters in the Performance Monitor tool to see what’s going on. Since everything looked OK, I’ve opened the IIS Manager console and clicked on the Worker Processes button to check for the active requests (I thought that there were some requests that the worker process couldn’t fetch). If you don’t know how to open the Worker Processes check out the next image:
After clicking the Worker Processes button, I have received the following error:
After acknowledged this error, I’ve checked the Event Viewer to see if something’s going on with IIS or any services associated with it. What I’ve discovered was that a critical error was getting reported by Event Viewer over and over again. The following image displays that particular error, you can even see a short description of it:
There was something wrong with worker processes performance counters. To check the status of the performance counters, use the lodctr command. To see a short description of this command type lodctr /? from the command prompt:
The next thing I did was to run the lodctr /q:PerfProc command to see the performance counters status:
As you can see from the image, the Performance Counter status was Disabled. To enable them, I used the same command but with different parameters, lodctr /e:PerfProc. After running this command, I’ve rechecked the performance counters status using the lodctr /q:PerfProc command:
Because the status have changed, I had only one thing to do, restart the World Wide Web Publishing Service. I’ve entered the Services console (services.msc from the run prompt) and restarted the service:
When I rechecked the worker processes tab from the IIS Manager console, the problem was still there. I’ve discovered that you have to STOP/START the World Wide Web Publishing Service so that the changes can have effect. You can achieve this by using the Services console or the following commands using command prompt: NET STOP W3SVC and then NET START W3SVC. After running these two commands, the problem was fixed and I was able to see the active requests. That particular application was requesting for some files that did not existed so the IIS got stuck for a while. After fixing the code, the application worked perfectly and I didn’t received any complains since then.
I don’t know how many of you encountered this problem, but for those that didn’t stumbled upon this, I hope this will serve you well. Leave any comment or post any question that you have regarding this article. Have a wonderful day and stay tuned for more articles from IT training day.