Thursday, July 21, 2011

IIS7 activity and watching active connections... how to figure out what's slowing down your web server

Hopefully this will save someone the headaches we went through a few times already.

Here is an easy way of figuring out what requests/webpages are crashing, slowing down, taking up a lot of CPU, or just taking a long time on your IIS 7 Web Server:

1) Open IIS Manager.
2) Highlight (click) machine name in the "Connection" pane on the left. For me, it's right below "Start Page".
3) In the Features View Pane on the right, click on "Worker Processes" icon. If you don't see the icon it probably means you selected something other than the machine name in the "Connections Pane"
4) At this point you will be able to see which website (by application pool name) is taking up all the CPU.
5) Double click on the application pool to get ALL the info you need to figure out what webpages/scripts are being requested, as well is who is calling them and for how long they have been running!

Maybe I wasn't using the right key words, but I tried searching for:

IIS7 Active Connections
IIS7 Current Connections
IIS7 Current Sessions
IIS7 Current activity
IIS7 Activity Monitor


I'm sure it my fault for using the wrong google queries, but a lot of the results were people asking for exactly the information the worker process pane provides! And yet nobody was saying to just look at Worker Processes. Instead the forums are full of suggestions to use Tracing and Performance Monitor.

If you are trying to figure out how many active web connections each of your web farm servers are running, you should be using Performance Monitor. If you are trying to figure out why a particular request fails, you should be using Tracing (I have yet to get a trace to actually reveal easy to understand and helpful information). However, if you just want to find out what web activity is currently going on with your IIS server, follow the directions above.

I hope this helps somebody (or maybe everyone already knew this but me?)

5 comments: