I came across a problem with NPC web not loading and showing this error:
Server Error in '/npc' Application.
________________________________________
Commands out of sync; You can't run this command now
Windows Event Viewer Application log has:
ASP.NET
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1/Root/npc
Process ID: 2540
Exception: System.OutOfMemoryException
Message: Exception of type 'System.OutOfMemoryException' was thrown.
StackTrace: at System.IO.MemoryStream..ctor(Int32 capacity)
DebugDiag is just the tool to troubleshoot this.
MS has these steps.
Configure DebugDiag to capture the memory dump when the BreakPoint Exception is thrown and when the process stops.
- Open DebugDiag
- On the Rules tab, click Add Rule
- Select Crash and click Next
- Select All IIS Processes and click Next
- Click Advanced Exception Configuration
- Click Add Exception
- Select Breakpoint Exception, change Action Type to Full UserDump
- Click OK
- Click Save and Close
- Click Advanced Breakpoint Configuration
- Click Add Breakpoint
- Type KERNEL32!ExitProcess and change Action Type to Full UserDump
- Click OK
- Click Save and Close
- Click Next through the rest of the wizard
Inject LeakTrack.dll to capture native leak information:
- Click the Processes tab
- Right-click the ASPNET_WP.exe process (or w3wp.exe if running in IIS 6), select Monitor for leaks
After the issue occurs
The memory dump will automatically get captured when the OutOfMemoryException is thrown.
A. Stop the Performance Monitor log