Analytics


Google

Thursday, June 19, 2008

Sometimes we just need to reboot the server

Our team develops a lot of web applications (asp and asp.net). However, we have seen several occasions when our program stops working properly. We are currently working with Windows 2000, so we use IIs5Recycle to improve the stability of the server.

I thought I will share some of the problems we saw and the solutions:


1. Selected pages stop responding while others continue to respond.
- In this case, we found that one of our Oracle stored packages became invalid. Once we recompiled the invalid package, everything returned to normal.

2. All pages suddenly slowed down or only asp.net pages stopped responding.
- One of the asp.net pages hit a contention and chewed up all the cpu.
- Stopping and starting the web publishing service did not help.
- Solution is to simply kill the asp.net process.

3. We use awstat to collect compile usage statistics of our website and suddenly, we encounter that the page was sending incomplete/invalid header.
- I tried many things but finally a reboot just fixes it.



We have seen also many cases when the pages started misbehaving, invalid access etc. So word of advise, before jumping into conclusion that the problem is with the code, try the following sequence:
  1. See if asp.net is chewing up all your cpu. If so, just kill it and the web server should return to normal. However, a note of caution, this should be done only if your server is not under powered and 100% cpu is not a normal occurrence.
  2. Use the services and stop and restart "World Wide Web Publishing Service". It should be last service in the list (default listing).
  3. Last resort, reboot Windows.
Windows 2003 provides a more robust IIS and introduces the concept of application pools. Instead of asp.net processes, you will now see w3wp.exe processes. These are the worker processes and you will see at least one for each running pool - you may see more.

Still the concept is similar.

No comments: