I have the following scenario:

3 windows server 2012 virtual servers, all with IIS 8:

  • 1 server with Application Request Routing 3
  • 2 servers with the web applications that the ARR server routes to

I am getting intermittent 502 3 12002 errors.

Following this guide http://www.iis.net/learn/extensions/troubleshooting-application-request-routing/troubleshooting-502-errors-in-arr

I have identified that I need to trace using netsh the WinHttp/WebIO providers to get to the real error code that is mapped to the 12002 error code.

I run the trace as the article suggests:

netsh trace start scenario=internetclient capture=yes persistent=no level=verbose tracefile=c:\temp\net.etl

When analysing the output of the netsh traces, I don't get the level of information that the article suggests I should. Specifically I only get the following types of entry in the trace viewed using netmon:

WINHTTP_MicrosoftWindowsWinHttp:Stopping WorkItem Thread Action...
WINHTTP_MicrosoftWindowsWinHttp:Starting WorkItem Thread Action...
WINHTTP_MicrosoftWindowsWinHttp:Queue Overlapped IO Thread Action...

I certainly don't get anything detailed enough that would help me understand why am getting any timeouts.

Is there any reason why Server 2012 wouldn't trace the WinHttp API to the level I need?



According to http://support.microsoft.com/kb/193625, and mentioned in the page you linked to, the win32 error code of 12002 indicates a timeout. ARR has a built in time out of 30 seconds and if any request takes longer than 30 seconds, then ARR will timeout and throw a 502.3. If this happens, you should be able to look at the IIS logs on your ARR server and see that the requests that 502.3 are taking 30 seconds (or you can just time the request manually).

If the default 30 second timeout is to short for you, then you can manually change it in the applicatoinHost.config file under the element. By default the timeout property is not there. An example of the element with the timeout specified as 1 minute is as follows:

    <webFarm name="Example Farm" enabled="true">
        <server address="webServer1" enabled="true" />
        <server address="webServer2" enabled="true" />
            <protocol timeout="00:01:00" />
            <add name="Microsoft.Web.Arr.HostNameRoundRobin" />
            <add name="Microsoft.Web.Arr.HostNameMemory" />

As always, you should backup this file prior to editing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.