IIS - w3wp.exe CPU Utilization
Asked By ao
20-Aug-07 07:47 AM

I've browsed the newsgroup for an answer, however, most posts stated
to post the results of the DebugDaig.
I have an issue with w3wp.exe utilizing up to 99% of the CPU. I have
isolated the actual application pool and have ran the diagnostic
tool. The report was VERY large, so I just posted the top 5 threads
by CPU time below.
Can someone please help me determine what the problem can be and
provide insight on how I can fix it?
Thanks!!!
Below is the report:
Type of Analysis Performed Hang Analysis
Machine Name SV1680
Operating System Windows Server 2003 Service Pack 2
Number Of Processors 2
Process ID 16800
Process Image c:\WINDOWS\system32\inetsrv\w3wp.exe
System Up-Time 4 day(s) 12:43:01
Process Up-Time 01:41:38
Top 5 Threads by CPU time
Note - Times include both user mode and kernel mode for each thread
Thread ID: 39 Total CPU Time: 00:03:51.296 Entry Point for
Thread: mscorwks!Thread::intermediateThreadProc
Thread ID: 40 Total CPU Time: 00:02:53.671 Entry Point for
Thread: mscorwks!Thread::intermediateThreadProc
Thread ID: 23 Total CPU Time: 00:02:47.936 Entry Point for
Thread: mscorwks!SVR::gc_heap::gc_thread_stub
Thread ID: 24 Total CPU Time: 00:02:25.156 Entry Point for
Thread: mscorwks!SVR::gc_heap::gc_thread_stub
Thread ID: 21 Total CPU Time: 00:00:14.718 Entry Point for
Thread: mscorwks!ThreadpoolMgr::intermediateThreadProc
Thread 39 - System ID 17484
Entry point mscorwks!Thread::intermediateThreadProc
Create time 8/19/2007 9:09:18 PM
Time spent in user mode 0 Days 00:02:35.187
Time spent in kernel mode 0 Days 00:01:16.109
Function Source
ntdll!KiFastSystemCallRet
ntdll!NtWaitForSingleObject+c
kernel32!WaitForSingleObjectEx+ac
mscorwks!PEImage::LoadImage+199
mscorwks!CLREvent::WaitEx+117
mscorwks!CLREvent::Wait+17
mscorwks!SVR::gc_heap::wait_for_gc_done+99
mscorwks!SVR::gc_heap::try_allocate_more_space+17
mscorwks!SVR::gc_heap::allocate_more_space+2f
mscorwks!SVR::gc_heap::allocate_large_object+86
mscorwks!SVR::GCHeap::Alloc+bc
mscorwks!Alloc+60
mscorwks!SlowAllocateString+29
mscorwks!FramedAllocateString+a0
mscorlib_ni+29c01f
System_Web_ni+223a84
System_Web_ni+223ad0
System_Web_ni+23386f
System_Web_ni+234a1b
System_Web_ni+234967
System_Web_ni+234887
System_Web_ni+d27d4
System_Web_ni+a15b5
System_Web_ni+b32e0
System_Web_ni+a0225
System_Web_ni+a550b
mscorlib_ni+299bb8
Back to Top
Thread 40 - System ID 18372
Entry point mscorwks!Thread::intermediateThreadProc
Create time 8/19/2007 9:45:55 PM
Time spent in user mode 0 Days 00:01:44.578
Time spent in kernel mode 0 Days 00:01:09.093
Function Source
ntdll!KiFastSystemCallRet
ntdll!NtWaitForSingleObject+c
kernel32!WaitForSingleObjectEx+ac
mscorwks!PEImage::LoadImage+199
mscorwks!CLREvent::WaitEx+117
mscorwks!CLREvent::Wait+17
mscorwks!SVR::gc_heap::wait_for_gc_done+99
mscorwks!SVR::GCHeap::GarbageCollectGeneration+267
mscorwks!SVR::gc_heap::try_allocate_more_space+1c0
mscorwks!SVR::gc_heap::allocate_more_space+2f
mscorwks!SVR::gc_heap::allocate_large_object+86
mscorwks!SVR::GCHeap::Alloc+bc
mscorwks!Alloc+60
mscorwks!SlowAllocateString+29
mscorwks!FramedAllocateString+a0
mscorlib_ni+29c01f
Microsoft_VisualBasic_ni+5e49b
System_Web_ni+223a84
System_Web_ni+223ad0
System_Web_ni+23386f
System_Web_ni+234a1b
System_Web_ni+234967
System_Web_ni+234887
System_Web_ni+d27d4
System_Web_ni+a15b5
System_Web_ni+b32e0
System_Web_ni+a0225
System_Web_ni+a550b
mscorlib_ni+299bb8
Thread 23 - System ID 11568
Entry point mscorwks!SVR::gc_heap::gc_thread_stub
Create time 8/19/2007 8:10:40 PM
Time spent in user mode 0 Days 00:02:05.796
Time spent in kernel mode 0 Days 00:00:42.140
Function Source
ntdll!KiFastSystemCallRet
ntdll!NtProtectVirtualMemory+c
kernel32!VirtualProtectEx+20
kernel32!VirtualProtect+18
mscorwks!EEVirtualProtect+84
mscorwks!CExecutionEngine::ClrVirtualProtect+15
mscorwks!ClrVirtualProtect+1b
mscorwks!CpuStoreBufferControl::FlushStoreBuffers+2a
mscorwks!Thread::SysSuspendForGC+14f
mscorwks!SVR::GCHeap::SuspendEE+16c
mscorwks!SVR::gc_heap::gc_thread_function+3b
mscorwks!SVR::gc_heap::gc_thread_stub+9b
kernel32!BaseThreadStart+34
Back to Top
Thread 24 - System ID 16748
Entry point mscorwks!SVR::gc_heap::gc_thread_stub
Create time 8/19/2007 8:10:40 PM
Time spent in user mode 0 Days 00:02:12.250
Time spent in kernel mode 0 Days 00:00:12.906
Function Source
ntdll!KiFastSystemCallRet
ntdll!NtWaitForSingleObject+c
kernel32!WaitForSingleObjectEx+ac
mscorwks!PEImage::LoadImage+199
mscorwks!CLREvent::WaitEx+117
mscorwks!CLREvent::Wait+17
mscorwks!SVR::gc_heap::gc_thread_function+58
mscorwks!SVR::gc_heap::gc_thread_stub+9b
kernel32!BaseThreadStart+34
Thread 21 - System ID 15288
Entry point mscorwks!ThreadpoolMgr::intermediateThreadProc
Create time 8/19/2007 8:10:40 PM
Time spent in user mode 0 Days 00:00:12.234
Time spent in kernel mode 0 Days 00:00:02.484
Function Source
ntdll!KiFastSystemCallRet
ntdll!NtWaitForSingleObject+c
kernel32!WaitForSingleObjectEx+ac
mscorwks!PEImage::LoadImage+199
mscorwks!CLREvent::WaitEx+117
mscorwks!CLREvent::Wait+17
mscorwks!ThreadpoolMgr::SafeWait+73
mscorwks!ThreadpoolMgr::WorkerThreadStart+f5
mscorwks!ThreadpoolMgr::intermediateThreadProc+49
kernel32!BaseThreadStart+34
Other info:
COM+ STA ThreadPool Report
Max STA Threads 50
Min STA Threads 4
Current STA Threads 4
g_activitiesPerThread 1
EmulateMTSBehavior False
STA Threads In-Call 0 (none)
Note: There was an error collecting details for the COM+ STA
Threadpool threads. The internal COM+ data structures may have been
corrupted.
Well-Known COM STA Threads Report
STA Name Thread ID Thread Status Call Status
Main STA 15 Idle (N/A)
HTTP report
IIS ATQ worker thread count 5 Thread(s)
Available ATQ worker thread count 5 Thread(s)
Active client connections 31 client connection(s)
Windows Server 2003
(1)
NtWaitForSingleObject
(1)
EmulateMTSBehavior
(1)
SysSuspendForGC
(1)
IIS
(1)
NtProtectVirtualMemory
(1)
CpuStoreBufferControl
(1)
EEVirtualProtect
(1)
Egbert Nierop \(MVP for IIS\) replied...
Can you manage to see which ASPX was running during the High Peak?
This can be 'seen' more or less, in the W3SVC Log files and iisstate also
should report which page was running.
David Wang replied...
Looks like you are running a .Net Application which is leaking memory
-- I mean, waiting for Garbage Collection to free up resources instead
of managing memory better. When the GC happens, the w3wp.exe CPU goes
to 100% and no managed code executes. The GC is the price you pay for
writing managed code.
You probably want to start by analyzing what managed/native objects
you are leaking (i.e. not disposing quickly enough) to avoid the GC.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
ao replied...
Yes, it is a .NET application and I have figured out which one it is.
I isolated it into it's own application pool.
After posting my original post, I found the site that has the IISState
and will be installing that. I am hoping to isolate this down to the
exact page that is causing the problem.
I will post the results of IISState later today.
Thank you VERY much for not only your response, but also how fast you
all responded!!!

Using IISState IIS Hi, This is my first post here. I have a web service that runs on IIS. For the past couple months, the processes that call the web service suddenly find that tried IISState after seeing this post here: http: / / groups.google.com / group / microsoft.public.inetserver.iis / browse_frm / thread / 34bc2be635b26531?tvc = 1 I tried to use iisstate -p [process id #] -sc and path is: SRV*C: \ iisstate \ symbols*http: / / msdl.microsoft.com / downloa d / symbols Microsoft (R) Windows Debugger Version 6.2.0013.1 Copyright (c) Microsoft Corporation. All rights reserved. * ** wait with http: / / msdl.microsoft.com / downloa d / symbols Executable search path is: ModLoad: 01000000 01005000 c: \ windows \ system32 \ inetsrv \ w3wp.exe ModLoad: 7c800000 7c8c0000 C: \ WINDOWS \ system32 \ ntdll.dll ModLoad: 77e40000 77f42000 C: \ WINDOWS \ system32 \ kernel32.dll ModLoad: 77ba0000 77bfa000 C: \ WINDOWS \ system32 \ msvcrt.dll ModLoad: 77f50000 77feb000 C: \ WINDOWS \ system32 \ ADVAPI32.dll ModLoad: 77c50000 77cef000 C
losing links and images-IIS question IIS Hi, We have created a new Website, if I copy it to a folder and open the index page everything is fine but when I put in IIS, and right click on site and then browse I am not able to see links and photos. Any idea how to troubleshoot this? Rob IIS Discussions IIS (1) Graphics (1) Victory (1) Squares (1) Windows (1) Beatty (1) W3SVC924797646 (1) Image006 (1) Hello, What do you see? Are the references to the images correct? - - Regards, Kristofer Gafvert http: / / www.gafvert.info / iis / - IIS Related Info Yes, they are seem to be fine but you only see a red
WScript.Shell Microsoft VBScript runtime error '800a0046' IIS Erorr is - -- -- -- -- -- -- -- -- -- -- Microsoft VBScript runtime error '800a0046' Permission denied / a.asp, line 3 - -- -- -- -- -- -- -- -- -- -- -- Code is - -- -- -- -- -- -- -- -- -- -- -- Set WShShell = Server.CreateObject("WScript.Shell") WShShell.Run "cmd / c dir", 0, True %> - -- -- -- -- -- -- -- -- -- -- -- This is a standart iis user site at c: \ inetpub \ wwwroot with full permissions to iis user. server hasnt got any av or smilar sow installed I have tried - -- -- -- -- -- -- -- -- - editing cmd security and Inetpub \ wwwroot \ a.asp SUCCESS 845 11:46:17 w3wp.exe:11228 QUERY INFORMATION C: \ WINDOWS \ system32 \ wshom.ocx SUCCESS Attributes: A 846 11:46:17 w3wp.exe:11228 OPEN C: \ WINDOWS \ system32 \ wshom.ocx SUCCESS Options: Open Access: 00100020 847 11:46:17 w3wp.exe:11228 QUERY INFORMATION C: \ WINDOWS \ system32 \ wshom.ocx SUCCESS Length: 98304 848 11:46:17 w3wp.exe:11228 CLOSE C
IIS6 crashes, WinDBG helpneeded IIS Hi, !analyze -v is below. How exactly I can read stack if lowest row does memory at "0x%08lx". The memory could not be "%s". READ_ADDRESS: 0327e02d BUGCHECK_STR: ACCESS_VIOLATION ORIGINAL_CAB_PATH: C: \ WINDOWS \ PCHealth \ ErrorRep \ QSIGNOFF \ EF066.cab NTGLOBALFLAG: 0 MANAGED_STACK: !dumpstack -EE OS Thread Id: 0x91c (33 8a STACK_COMMAND: ~33s; .ecxr ; kb FAILURE_BUCKET_ID: ACCESS_VIOLATION_msvcr70!_beginthreadex+8a BUCKET_ID: ACCESS_VIOLATION_msvcr70!_beginthreadex+8a Followup: MachineOwner IIS Discussions NtWaitForSingleObject (1) ASP.NET (1) SiebelBusObjectInterfaces (1) RtlpCoalesceFreeBlocks (1) RunMainThreadLoop (1) UlAtqStartListen (1) WmainCRTStartup (1) ChildEBP to Child 0006fc08 7c822124 77e6bad8 00000180 00000000 ntdll!KiFastSystemCallRet 0006fc0c 77e6bad8 00000180 00000000 00000000 ntdll!NtWaitForSingleObject+0xc 0006fc7c 77e6ba42 00000180 ffffffff 00000000 kernel32!WaitForSingleObjectEx+0xac 0006fc90 5a36467a 00000180 ffffffff 00000000 kernel32 start end module name 01000000 01005000 w3wp # (pdb symbols) C: \ Program Files \ Debugging Tools for Windows \ sym \ w3wp.pdb \ D7E88A6D65314A0DACE963B6252016741 \ w3wp.pdb 023e0000 023ec000 App_Code C (no symbols) 02830000 02844000 SiebelObjectLibrary 03640000 0364e000 sslcsnom (export symbols) sslcsnom.dll 03bd0000 03be8000 App_Web_defaultwsdlhelpgenerator_aspx_cdcab7d2_ihb_nefu C (private pdb symbols) c: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET Files \ webservices_eservicews \ d462b199 \ 967a221f \ App_Web_defaultwsdlhelpgenerator.aspx export symbols) sslczlib.dll 5a300000 5a307000 w3tp (pdb symbols) C: \ Program Files \ Debugging Tools for Windows \ sym \ w3tp.pdb \ 56F01DE2A8604D5881B61771296802AE1 \ w3tp.pdb 5a320000 5a332000 w3isapi (pdb symbols) C: \ Program Files \ Debugging
Non Zero Return Code when recycling App Pools. IIS Hello all. Does anyone know why I would get a Non Zero return code when for process id 9188 [12 / 6 / 2007 5:43:21 PM] Process created. BaseModule - c: \ windows \ system32 \ inetsrv \ w3wp.exeBaseThread System ID - 2164 [12 / 6 / 2007 5:43:21 PM] Thread Thread created. New thread system id - 5332 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS \ system32 \ ntdll.dll loaded at 0x7c800000 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS \ system32 \ kernel32.dll loaded at 0x77e40000 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS \ system32 \ msvcrt.dll loaded at 0x77ba0000 [12 / 6 / 2007 5:43:21 PM] C WINDOWS \ system32 \ ADVAPI32.dll loaded at 0x77f50000 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS \ system32 \ RPCRT4.dll loaded at 0x77c50000 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS \ system32 \ USER32.dll loaded at 0x77380000 [12 / 6 / 2007 5:43:21 PM] C: \ WINDOWS