Web Debug

Fix broken web applications, from servers to clients.

GC (Garbage Collection) related

Do you know GC(Garbage Collection)? Here is a list of questions with answers. You can check whether you can answer them.

.NET Garbage Collector PopQuiz - Followup
By Tess Ferrandez

1. How many GC threads do we have in a .NET process running the Server version of the GC on a dual-core machine?
2. What GC mode is used in the web development server (cassini) on a quad proc machine? Why? (you can choose from server, workstation or concurrent-workstation)
3. How many finalizer threads do we have in a .NET process running the Server version of the GC on a quad proc machine?
4. When is an object garbage collected?
5. What causes an object to move from Generation 0 to Generation 1 or to Generation 2?
6. If you look at the GC sizes for Generation 0, 1 and 2 in perfmon, why is most of the memory in the process in Gen 2?

Troubleshoot IIS crash issue

Debugging a .NET crash with rules in Debug Diag
By Tess Ferrandez

Even though debugging might be tricky, setting up rules in Debug Diag is beautifully simple and I personally believe that it would be a good idea for anyone running a web site to have debug diag installed along with a few instructions for the ops personnel on how to set up the rules. Better yet, you can set up the rules in advance and just activate or deactivate them as needed.

Problem description
The application crashes with the following event in the eventlog

Log Name: Application
Source: Application Error
Date: 2009-03-20 11:12:09
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Faulting application w3wp.exe, version 7.0.6001.18000, time stamp 0x47919413, faulting module kernel32.dll, version 6.0.6001.18000, time stamp 0x4791a76d, exception code 0xe053534f, fault offset 0x000442eb, process id 0x%9, application start time 0x%10.

Troubleshooting IIS high memory issue

Troubleshooting System.OutOfMemoryExceptions in ASP.NET
By Jim Cheshire

When the .NET Framework was first released, many developers believed the introduction of the garbage collector meant never having to worry about memory management ever again. In fact, while the garbage collector is efficient in managing memory in a managed application, it's still possible for an application's design to cause memory problems.

One of the more common issues we see regarding memory involves System.OutOfMemoryExceptions. After years of helping developers troubleshoot OutOfMemoryExceptions, we've accumulated a short list of the more common causes of these exceptions. Before I go over that list, it's important to first understand the cause of an OutOfMemoryException from a 30,000 foot view.

Troubleshoot IIS high CPU issue

Troubleshooting High CPU in an IIS 7.x Application Pool

Published on April 9, 2012 by Jim Cheshire

This troubleshooter will help you to identify the cause of sustained high CPU in an IIS application pool. It’s important to keep in mind that it is normal for CPU usage to increase as a web application serves requests. However, if you consistently see CPU remain at a high level (in the area of 80% or greater) for prolonged periods, the performance of your application will suffer. For that reason, it’s important to understand the cause of sustained high CPU so that it can be addressed and corrected if possible.

IIS application pool recycle related

An application pool is a group of one or more URLs that are served by a worker process or set of worker processes. Any Web directory or virtual directory can be assigned to an application pool. Every application within an application pool shares the same worker process. Because each worker process operates as a separate instance of the worker process executable, W3wp.exe, the worker process that services one application pool is separated from the worker process that services another.

Unexpected application recycle will cause various issues of the web application, check articles below related to this topic,

ASP.NET Case Study: Lost session variables and appdomain recycles
By Tess Ferrandez

  • What happens when an application domain is recycled?
  • Why does an application domain recycle?
  • How do you determine that you have application recycles?
  • How do you determine what caused an appdomain restart?

Fork me on GitHub