Without much ado, let me tell you a few problem descriptions
(mostly dealt by the web administrators).
Problem 1: I have a few ASP.NET websites that work just fine
for most of the time, but I do not know what happens at some sporadic intervals
when things break and my clients start seeing Server Application Unavailable
error. Sometimes, it gets fixed on its own and at other times I have to reset
my IIS Server or reboot my server to get everything back to normal.
Problem 2: Everything was working fine until yesterday night
when after rebooting, our IIS server has started behaving erratically, throwing
all these weird error messages every few hours. I am not even sure what changed
and I have no clue of how to fix this.
Problem 3: My w3wp.exe stars with low CPU but somehow over
the course of time it starts to hover at 100% and eventually my server becomes
pathetically slow. I restart the box or reset my IIS to fix the issue, but
somehow it re-appears.
Problem 4: I have a lot of ASP.NET websites and a few
classic ASP websites on the same web server. Whenever the load is high on the
server during X AM - Y PM it responds very slowly and sometimes does not
respond at all. We reset IIS and it works well for some time, but it then hangs
again. The CPU stays low and I am not sure if it is IIS causing the issue or
there is a bottleneck elsewhere.
Problem 5: Recently I have deployed a couple of ASP.NET
applications and I have noticed that it sucks the memory pretty soon and
gradually moves up to about 800 MB to 1GB and then my users start seeing
System.OutOfMemory exceptions until I reset my IIS or reboot my box.
Do these problem descriptions sound familiar? These and many
other similar problems (sometimes multiple issues at the same time) make the
job of a web administrator really challenging. As you can easily figure out
from the above problems, there is a common resolution to most of these - reset
IIS or reboot the server or something on a similar ground. As you would agree,
none of these resolutions are REAL solutions. They are just workarounds and act
as just a simple band-aid to a chronic issue which is good enough to give
sleepless nights to quite a few concerned. In this article (and some more to
come), I will dissect the problems above and more in a more practical way using
some debugging tools and techniques which is called Post-Production debugging.
This simply means to debug issues that are very difficult to reproduce (and
quite often not even anticipated) in the development scenario where we do not
have as much load on the server as we do in production.
Please keep in mind that I am not talking about setting a
breakpoint in the Visual Studio IDE and finding those small and pesky bugs.
Here we are looking at the general picture of the server with problems (or
sometimes, just to baseline the things so that you can keep yourself away from
the problems!!) and using the tools which you might like to keep on any IIS
server. For me, keeping some of the following tools installed on any IIS server
is like having an ambulance or at least a good first aid kit at my disposal.
No, I am not asking you to keep 20 different diagnostic services installed and
running on your server. All I am telling you is to be prepared, paranoid and
beware!
Believe me, when your server is in a bad shape, the first
thing you would hate to do is to install some of the tools from the internet,
especially if it has become a critical issue to you.
Okay, I am done with the preaching part. Let me start with
the actual stuff now… the Tools (some you already have on your server, while
some you need to download and install). In this article I will discuss the 4
most important tools which, in my humble opinion, are a must have for any
server. I will build on this article in more detail in the forthcoming
articles. Stay tuned!