Iis 7 rewrite rules causes Max cpu utilization in iis 8.5RSS

7 replies

Last post Feb 20, 2020 03:27 PM by minhkienads

‹ Previous Thread|Next Thread ›
  • Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 02, 2016 08:58 PM|estaalsmid|LINK

    We're migrating from w2008 iis 7 to w2012 iis 8.5. When copying the iis 7 applicationhost.config to iis 8.5 it causes the w3p proces to utilize all cpu power, all 20 cores at 100℅.

    The load on both servers are identical, there are a lot of rules (config file is about 7MB containing only one web instance), config is identical, Both servers are behind the same load-balancer, both using the same copies of the website folder (dll's), The only difference is a new server with w2012 and iis 8.5.

    Disabling all rules gives is a normal cpu utilization.

    Wat is going on,  has anyone an idea?

  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 03, 2016 10:56 AM|lextm|LINK

    What are the rewrite rules? Since you move from a server to another, some rules might simply fail and lead to infinite loop.

    Lex Li
    https://lextudio.com
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 03, 2016 11:53 AM|estaalsmid|LINK

    We literally have > 1000 global rules and use several rewrite-maps.  The rules are valid, they already ran in production for several months. The only difference is the OS and IIS version, could it be that IIS 8.5 interprets the rules differently?  

    It looks like internal looping or a lack of caching, we also don't see differences in the amount of requests (so it is not externally looping).
    No failed requests, no event logging... just 6 new high end Windows 2012 servers that can't be put into production because of this rewrite issue.

  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 04, 2016 10:02 AM|Yuk Ding|LINK

    Hi estaalsmid,

    Your problem seems to be a infinite loop problem. I'm not sure whether there is a method to figure out which rewrite rule cause the problem.

    Maybe you need to disable all the rewrite rule and enable them one by one to figure out which rewrite rule cause the problem.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 04, 2016 03:25 PM|abrummelhuis|LINK

    We used the Debug Diagnostics tool to generate a dump when the CPU was 100% and this is the result.

    The question is why complete identical rewrite rules on Windows Server 2008 / IIS7 run without any problem and on Windows Server 2012 / IIS8.5 we see this behaviour.

    CrashHangAnalysis

    Report for IIS_COM+w3wp.exe__[website]__PID__163816__Date__10_04_2016__Time_03_52_21PM__366__Manual Dump.dmp

    Type of Analysis Performed Hang Analysis
    Machine Name [servername]
    Operating System Windows Server 2012
    Number Of Processors 20
    Process ID 163816
    Process Image c:\Windows\System32\inetsrv\w3wp.exe
    Command Line c:\windows\system32\inetsrv\w3wp.exe -ap "[website]" -v "v4.0" -l "webengine4.dll" -a \\.\pipe\iisipm345fd0b7-9f15-40fa-82b3-cc1727642eed -h "C:\inetpub\temp\apppools\[website]\[website].config" -w "" -m 0
    System Up-Time 2 day(s) 13:49:43
    Process Up-Time 01:51:00
    Processor Type X64
    Process Bitness 64-Bit

    Top 5 Threads by CPU time

    Note - Times include both user mode and kernel mode for each thread
    Thread ID: 13 Total CPU Time: 00:01:58.374 Entry Point for Thread: w3tp!THREAD_MANAGER::ThreadManagerThread
    Thread ID: 7 Total CPU Time: 00:01:58.359 Entry Point for Thread: w3tp!THREAD_MANAGER::ThreadManagerThread
    Thread ID: 11 Total CPU Time: 00:01:58.218 Entry Point for Thread: w3tp!THREAD_MANAGER::ThreadManagerThread
    Thread ID: 19 Total CPU Time: 00:01:57.812 Entry Point for Thread: w3tp!THREAD_MANAGER::ThreadManagerThread
    Thread ID: 15 Total CPU Time: 00:01:57.749 Entry Point for Thread: w3tp!THREAD_MANAGER::ThreadManagerThread

    CLR Information

    Locked critical section report

    Critical Section rewrite!RegisterModule+5058c
    Lock State Transitioning
    Lock Count 18
    Recursion Count 0
    Entry Count 0
    Contention Count 1006736
    Spin Count 33556432

    20 Threads (17% of all threads) have this same call stack.
    Note: Grouping of identical threads can be disabled in the 'Preferences' tab of the Analysis Options

    Some examples of the Threads:

    Thread 7 - System ID 163168

    Entry point w3tp!THREAD_MANAGER::ThreadManagerThread
    Create time 4-10-2016 14:01:24
    Time spent in user mode 0 Days 00:01:57.781
    Time spent in kernel mode 0 Days 00:00:00.578

    This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.

    ntdll!NtWaitForSingleObject+a
    ntdll!RtlpWaitOnCriticalSection+e1
    ntdll!RtlpEnterCriticalSectionContended+a4
    rewrite!RegisterModule+40d07
    rewrite!RegisterModule+22968
    rewrite!RegisterModule+2f350
    rewrite!RegisterModule+2eb01
    rewrite!RegisterModule+2e5f1
    rewrite!RegisterModule+2e86d
    rewrite!RegisterModule+2e86d
    rewrite!RegisterModule+2e036
    rewrite!RegisterModule+2dbce
    rewrite!RegisterModule+2d71f
    rewrite!RegisterModule+28ef9
    rewrite!RegisterModule+12e60
    rewrite!RegisterModule+13c83
    rewrite!RegisterModule+1365d
    rewrite!RegisterModule+f712
    rewrite!RegisterModule+1490
    rewrite!RegisterModule+5a8
    iiscore!NOTIFICATION_CONTEXT::RequestDoWork+105
    iiscore!NOTIFICATION_CONTEXT::CallModulesInternal+198
    iiscore!NOTIFICATION_CONTEXT::CallModules+36
    iiscore!NOTIFICATION_MAIN::DoWork+1cb
    iiscore!W3_MAIN_CONTEXT::OnNewRequest+243
    w3dt!WP_CONTEXT::OnCompletion+c3
    w3tp!THREAD_POOL_DATA::ThreadPoolThread+b3
    w3tp!THREAD_POOL_DATA::ThreadPoolThread+33
    w3tp!THREAD_MANAGER::ThreadManagerThread+3e
    kernel32!BaseThreadInitThunk+22
    ntdll!RtlUserThreadStart+34


    Thread 56 - System ID 163876

    Entry point clr!Thread::intermediateThreadProc
    Create time 4-10-2016 14:01:26
    Time spent in user mode 0 Days 00:00:01.328
    Time spent in kernel mode 0 Days 00:00:00.453

    ntdll!NtWaitForSingleObject+a
    KERNELBASE!WaitForSingleObjectEx+94
    clr!CLREventBase::WaitEx+168
    clr!CLREventBase::WaitEx+ff
    clr!CLREventBase::WaitEx+7c
    clr!SVR::gc_heap::bgc_thread_function+97
    clr!Thread::intermediateThreadProc+7d
    kernel32!BaseThreadInitThunk+22
    ntdll!RtlUserThreadStart+34

  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 05, 2016 12:57 PM|estaalsmid|LINK

    But why does it causing problems with IIS 8.5 and not with IIS 7?

  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Oct 06, 2016 02:26 AM|lextm|LINK

    abrummelhuis

    We used the Debug Diagnostics tool to generate a dump when the CPU was 100% and this is the result.

    Open a support case via http://support.microsoft.com and send the dump to Microsoft. Only they have the source code to check what's the cause in the quickest way.

    Lex Li
    https://lextudio.com
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Iis 7 rewrite rules causes Max cpu utilization in iis 8.5

    Feb 20, 2020 03:27 PM|minhkienads|LINK

    I got the same error, please help me

‹ Previous Thread|Next Thread ›