<p>We're running a custom application on our intranet and we have found a problem after upgrading it recently where IIS hangs with 100% CPU usage, requiring a reset.</p>

<p>Rather than subject users to the hangs, we've rolled back to the previous release while we determine a solution.  The first step is to reproduce the problem -- but we can't. </p>

<p>Here's some background:</p>

<p>Prod has a single virtualized (vmware) web server with two CPUs and 2 GB of RAM.  The database server has 4GB, and 2 CPUs as well.  It's also on VMWare, but separate physical hardware.</p>

<p>During normal usage the application runs fine.  The w3wp.exe process normally uses betwen 5-20% CPU and around 200MB of RAM.  CPU and RAM fluctuate slightly under normal use, but nothing unusual.</p>

<p>However, when we start running into problems, the RAM climbs dramatically and the CPU pegs at 98% (or as much as it can get).  The site becomes unresponsive, necessitating a IIS restart.  Resetting the app pool does nothing in this situation, a full IIS restart is required.</p>

<p>It does not happen during the night (no usage).  It happens more when the site is under load, but it has also happened under non-peak periods.</p>

<p>First step to solving this problem is reproducing it. To simulate the load, we starting using JMeter to simulate usage. Our load script is based on actual usage around the time of the crash.  Using JMeter, we can ramp the usage up quite high (2-3 times the load during the crash) but the site behaves fine.  CPU is up high, and the site does become sluggish, but memory usage is reasonable and nothing is hanging.</p>

<p>Does anyone have any tips on how to reproduce a problem like this in a non-production environment?  We'd really like to reproduce the error, determine a solution, then test again to make sure we've resolved it.  During the process we've found a number of small things that we've improved that might solve the problem, but I'd really feel a lot more confident if we could reproduce the problem and test the improved version.</p>

<p>Any tools, techniques or theories much appreciated!</p>

[{'answer_id': 9506, 'author': 'Curt Hagenlocher', 'author_id': 533, 'author_profile': 'https://Stackoverflow.com/users/533', 'pm_score': 1, 'selected': False, 'text': '<p>You can find some information about troubleshooting this kind of problem at <a href="http://blogs.msdn.com/tess/archive/2008/05/21/debugdiag-1-1-or-windbg-which-one-should-i-use-and-how-do-i-gather-memory-dumps.aspx" rel="nofollow noreferrer">this blog entry</a>. Her blog is generally a good debugging resource.</p>\n'}, {'answer_id': 9507, 'author': 'Jeff Atwood', 'author_id': 1, 'author_profile': 'https://Stackoverflow.com/users/1', 'pm_score': 1, 'selected': False, 'text': '<p>I have <a href="http://www.codinghorror.com/blog/archives/000015.html" rel="nofollow noreferrer">an article about debugging ASP.NET in production</a> which may provide some pointers.</p>\n'}, {'answer_id': 9535, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Is your test env the same really as live? \ni.e\n2 separate vm instances on 2 physical servers - with the network connection and account types?</p>\n\n<p>Is there any other instances on the Database?</p>\n\n<p>Is there any other web applications in IIS?</p>\n\n<p>Is the .Net Config right?</p>\n\n<p>Is the App Pool Config right for service accounts ?\n<a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/93275ef2-2f85-4eb1-8b92-a67545be11b4.mspx?mfr=true" rel="nofollow noreferrer">Try look at this - MS Article on II6 Optmising for Performance</a></p>\n\n<p>Lots of tricks.</p>\n'}]
['https://Stackoverflow.com/questions/9501', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']