I'm running a website with IIS8 on Windows Server 2012. I'm trying to determine what's causing high CPU usage by IIS (frequently 50% or more CPU usage by IIS). Server receives about 40 total requests per second throughout the day, but probably only 1-2 URLs per second that require processing.
I enabled Request Tracing and found that some RewriteModule requests are taking over 100 seconds (!) to complete. I'm having trouble determining how this is possible on a machine with more than sufficient hardware. The exact same URL structure is processed via mod_rewrite on Apache in less than a second.
An example URL would be like this:
http://<domain-name>/Product/<Parent-Category>/<Child-Category1>/<Child-Category2>/<Child-Category3>/<Product-Name>
The accompanying rewrite rule is:
<rule name="Rule" stopProcessing="true">
<match url="^Product/([^/\?]+)/?([^/\?]+)?/?([^/\?]+)?/?([^/\?]+)?/?([^/\?]+)?/?([^/\?]+)?/?[\?]?(.+)?$"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="/Product/index.php?a={R:1}&b={R:2}&c={R:3}&d={R:4}&e={R:5}&f={R:6}&{R:7}" appendQueryString="true"/>
</rule>
Is there something in the way that I'm defining the match URL that's causing high processing time? Some of the matching urls contain a high number of characters if they utilize many parent/child categories (up to 5, typically 3-4).