w3wp has high CPU and Memory UsageRSS

4 replies

Last post Oct 11, 2006 02:00 PM by ApurvaJoshi

  • w3wp has high CPU and Memory Usage

    Sep 17, 2006 06:11 AM|danielcheung|LINK

    I am using IIS6, my .aspx has set aspcompat="true"  to connect mysql DB using ADODB.connection through MyODBC. My mysql is version 5.0 and MyODBC is 3.5
    1, I found that my aspx crashed and have not response. I checked for the server and found that the process "w3wp.exe" have high CPU and high memory usag
    e...
    
    The following is the thread report from Debug Diag Tools (please pay attention at Thread 7):
    
    
    Thread 0 - System ID 3148
    Entry point   w3wp!wmainCRTStartup 
    Create time   9/17/2006 12:27:18 PM 
    Time spent in user mode   0 Days 0:0:0.93 
    Time spent in kernel mode   0 Days 0:0:0.62 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForSingleObject+c    
    kernel32!WaitForSingleObjectEx+ac    
    kernel32!WaitForSingleObject+12    
    w3dt!WP_CONTEXT::RunMainThreadLoop+10    
    w3dt!UlAtqStartListen+2d    
    w3core!W3_SERVER::StartListen+bd    
    w3core!UlW3Start+26e    
    w3wp!wmain+22a    
    w3wp!wmainCRTStartup+12b    
    kernel32!BaseProcessStart+23    
    
    
    
    
    Back to Top 
    
    
    Thread 1 - System ID 3324
    Entry point   ntdll!EtwpEventPump 
    Create time   9/17/2006 12:27:20 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForMultipleObjects+c    
    ntdll!EtwpWaitForMultipleObjectsEx+f7    
    ntdll!EtwpEventPump+27f    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 2 - System ID 2068
    Entry point   ntdll!RtlpTimerThread 
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtDelayExecution+c    
    ntdll!RtlpTimerThread+47    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 3 - System ID 1316
    Entry point   ntdll!RtlpWorkerThread 
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtRemoveIoCompletion+c    
    ntdll!RtlpWorkerThread+3d    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 4 - System ID 3844
    Create time   12:00:00 AM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!ZwReplyWaitReceivePortEx+c    
     rpcrt4!LRPC_ADDRESS::ReceiveLotsaCalls+1
    98    
    rpcrt4!RecvLotsaCallsWrapper+d    
    rpcrt4!BaseCachedThreadRoutine+9d    
    rpcrt4!ThreadStartRoutine+1b    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 5 - System ID 884
    Entry point    ole32!CRpcThreadCache::RpcWorkerThreadEn
    try 
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtDelayExecution+c    
    kernel32!SleepEx+68    
    kernel32!Sleep+f    
    ole32!CROIDTable::WorkerThreadLoop+14    
    ole32!CRpcThread::WorkerLoop+1e    
    ole32!_imp__InstallApplication <PERF> (ole32+0x0)    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 6 - System ID 3472
    Entry point    w3tp!THREAD_MANAGER::ThreadManagerThread
     
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtRemoveIoCompletion+c    
    kernel32!GetQueuedCompletionStatus+29    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    33    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    24    
     w3tp!THREAD_MANAGER::ThreadManagerThread
    +39    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 7 - System ID 1512
    Entry point    w3tp!THREAD_MANAGER::ThreadManagerThread
     
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.15 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtDeleteValueKey+c    
    advapi32!LocalBaseRegDeleteValue+86    
    advapi32!RegDeleteValueW+6c    
     webengine!CPerfCounterServer::CleanupNam
    es+20b    
     webengine!CPerfCounterServer::InitPerfPi
    pe+8    
     webengine!CPerfCounterServer::Initialize
    +6c    
     webengine!CPerfCounterServer::StaticInit
    ialize+36    
    webengine!AspNetGetExtensionVersion+11    
    w3isapi!ISAPI_DLL::Load+219    
    w3isapi!ISAPI_DLL_MANAGER::GetIsapi+1cd    
    w3isapi!ProcessIsapiRequest+96    
     w3core!W3_ISAPI_HANDLER::IsapiDoWork+3fd
        
    w3core!W3_ISAPI_HANDLER::DoWork+b0    
    w3core!W3_HANDLER::MainDoWork+16e    
     w3core!W3_CONTEXT::ExecuteCurrentHandler
    +53    
    w3core!W3_CONTEXT::ExecuteHandler+51    
     w3core!W3_STATE_HANDLE_REQUEST::DoWork+9
    a    
    w3core!W3_MAIN_CONTEXT::DoWork+a6    
    w3core!W3_MAIN_CONTEXT::OnNewRequest+55    
     w3dt!UL_NATIVE_REQUEST::DoStateProcess+4
    8    
    w3dt!UL_NATIVE_REQUEST::DoWork+7f    
    w3dt!OverlappedCompletionRoutine+1a    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    73    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    24    
     w3tp!THREAD_MANAGER::ThreadManagerThread
    +39    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 8 - System ID 2592
    Entry point    w3tp!THREAD_MANAGER::ThreadManagerThread
     
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    This thread is waiting on critical section 1361ef8 which is owned by thread 
    7
    
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForSingleObject+c    
    ntdll!RtlpWaitOnCriticalSection+19c    
    ntdll!RtlEnterCriticalSection+a8    
    w3isapi!ISAPI_DLL::Load+4b    
    w3isapi!ISAPI_DLL_MANAGER::GetIsapi+1cd    
    w3isapi!ProcessIsapiRequest+96    
     w3core!W3_ISAPI_HANDLER::IsapiDoWork+3fd
        
    w3core!W3_ISAPI_HANDLER::DoWork+b0    
    w3core!W3_HANDLER::MainDoWork+16e    
     w3core!W3_CONTEXT::ExecuteCurrentHandler
    +53    
    w3core!W3_CONTEXT::ExecuteHandler+51    
     w3core!W3_STATE_HANDLE_REQUEST::DoWork+9
    a    
    w3core!W3_MAIN_CONTEXT::DoWork+a6    
    w3core!W3_MAIN_CONTEXT::OnNewRequest+55    
     w3dt!UL_NATIVE_REQUEST::DoStateProcess+4
    8    
    w3dt!UL_NATIVE_REQUEST::DoWork+7f    
    w3dt!OverlappedCompletionRoutine+1a    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    73    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    24    
     w3tp!THREAD_MANAGER::ThreadManagerThread
    +39    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 9 - System ID 2432
    Entry point    w3tp!THREAD_MANAGER::ThreadManagerThread
     
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    This thread is waiting on critical section 1361ef8 which is owned by thread 
    7
    
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForSingleObject+c    
    ntdll!RtlpWaitOnCriticalSection+19c    
    ntdll!RtlEnterCriticalSection+a8    
    w3isapi!ISAPI_DLL::Load+4b    
    w3isapi!ISAPI_DLL_MANAGER::GetIsapi+1cd    
    w3isapi!ProcessIsapiRequest+96    
     w3core!W3_ISAPI_HANDLER::IsapiDoWork+3fd
        
    w3core!W3_ISAPI_HANDLER::DoWork+b0    
    w3core!W3_HANDLER::MainDoWork+16e    
     w3core!W3_CONTEXT::ExecuteCurrentHandler
    +53    
    w3core!W3_CONTEXT::ExecuteHandler+51    
     w3core!W3_STATE_HANDLE_REQUEST::DoWork+9
    a    
    w3core!W3_MAIN_CONTEXT::DoWork+a6    
    w3core!W3_MAIN_CONTEXT::OnNewRequest+55    
     w3dt!UL_NATIVE_REQUEST::DoStateProcess+4
    8    
    w3dt!UL_NATIVE_REQUEST::DoWork+7f    
    w3dt!OverlappedCompletionRoutine+1a    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    73    
     w3tp!THREAD_POOL_DATA::ThreadPoolThread+
    24    
     w3tp!THREAD_MANAGER::ThreadManagerThread
    +39    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 10 - System ID 3640
    Entry point   ntdll!RtlpWaitThread 
    Create time   9/17/2006 12:27:21 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForMultipleObjects+c    
    ntdll!RtlpWaitThread+161    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 11 - System ID 2452
    Entry point    w3core!HTTP_COMPRESSION::CompressionThre
    ad 
    Create time   9/17/2006 12:27:25 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtWaitForSingleObject+c    
    kernel32!WaitForSingleObjectEx+ac    
    kernel32!WaitForSingleObject+12    
     w3core!HTTP_COMPRESSION::CompressionThre
    ad+126    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 12 - System ID 636
    Entry point   rpcrt4!ThreadStartRoutine 
    Create time   9/17/2006 12:27:25 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!ZwReplyWaitReceivePortEx+c    
     rpcrt4!LRPC_ADDRESS::ReceiveLotsaCalls+1
    98    
    rpcrt4!RecvLotsaCallsWrapper+d    
    rpcrt4!BaseCachedThreadRoutine+9d    
    rpcrt4!ThreadStartRoutine+1b    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    Thread 13 - System ID 2688
    Entry point   ntdll!RtlpIOWorkerThread 
    Create time   9/17/2006 12:27:25 PM 
    Time spent in user mode   0 Days 0:0:0.0 
    Time spent in kernel mode   0 Days 0:0:0.0 
    
    
    
    
    Function   Source 
    ntdll!KiFastSystemCallRet    
    ntdll!NtDelayExecution+c    
    ntdll!RtlpIOWorkerThread+3f    
    kernel32!BaseThreadStart+34    
    
    
    
    
    Back to Top 
    
    
    
    Can anyone help me to solve this problems or tell me where is the problems (
    such as my code error, DB error, too high traffic .... etc), Thousands Thank
    s
    
  • Re: w3wp has high CPU and Memory Usage

    Sep 18, 2006 03:15 PM|ApurvaJoshi|LINK

    This is very ODD place to die. Thread 7 is serving up the very 1st request and hence it has the ISAPI dll load lock ( load ASP.NET ISAPI). Rest all threads will be blocked untill this request has been served up fine.

    Thread 7 is doing registry clean up for old names (pipe name) for the performance counters after grabbing the lock.

    In ideal world this will all go smoothly and I have never seen anyone dying here before.

     To make it short...

    if you have taken the dumps at the correct time then

    1) This is hang issue

    2) This is not spinning user mode CPU - might be spinning in Kernel trying to work with registry (DebugDiag has not yet reported it).

    3) The only thing I could think about is the permissions. Check the identity of the application pool and make sure it's member of IIS_WPG group.

    4) Make sure following registry key has enough perms for the identity under which your application pool is running (or IIS_WPG - from step 3).

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727\Names

    HTH,

    AJ

  • Re: w3wp has high CPU and Memory Usage

    Oct 02, 2006 11:44 AM|danielcheung|LINK

    I have found the problems is due to my IIS get a request from a web browsor that send the URL with "#", (such as http://www.abc.com/myapp.aspx?id=123%23testing), the w3wp will use up 100% memory and 100% CPU time and the IIS need to restart... How can I fix it ?
  • Re: w3wp has high CPU and Memory Usage

    Oct 03, 2006 11:26 AM|danielcheung|LINK

    Any responses ?
  • Re: w3wp has high CPU and Memory Usage

    Oct 11, 2006 02:00 PM|ApurvaJoshi|LINK

    Unfortunately, this issue requires more indepth diagnosis. I would recommend calling into Microsoft's product service support to expedite the progress.