5

When POST'ing a large file through ARR, the request times out after 120 seconds. The client recieves error code 502 Bad Gateway. I have configured the "proxy timeout" of the web farm to be 600 seconds. I have also configured the Connection time-out of Default Web Site to be 600 seconds. The ARR server has been restarted.

The following is from the log file on the ARR server:

2015-05-07 13:25:16 192.168.87.155 POST /Redacted/Import/RedactedImport20150507_152313.csv X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=253daa4a-8372-405a-8efd-21ebbc38353f 80 - 192.168.87.198 - redacted.local 502 3 64 120436

from applicationHost.config:

    <webFarm name="redacted.local" enabled="true">
        <server address="redacted.local" enabled="true" />
        <applicationRequestRouting>
            <healthCheck url="http://redacted.local/redacted.svc" liveTrafficFailureCodes="400-" />
            <protocol timeout="00:10:00" />
        </applicationRequestRouting>
    </webFarm>

Background:

I'm building a PoC for using ARR to achieve load balancing and high availability for our backend services, which are mostly WCF (Basic HTTP) and REST.

One of the (REST) services is used to recieve a large(ish) file a couple of times each day, from a batch job. The REST service does not return until the processing of the file is complete (which could take 5 minutes), since the client application needs to know when the processing is complete (more steps follows, which are dependent on the first).

Thomas M. H.
  • 51
  • 1
  • 1
  • 3

4 Answers4

4

In my case I resolved the problem by changing the proxy time-out

  1. Go to IIS manager
  2. Application requests routing
  3. Under "actions" go to server proxy settings
  4. Change the time-out to your desired value.

These steps are for IIS v7

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63
  • On my install of IIS 10/ WS2016 Step "2" here is called "Application Request Routing Cache", which is a bit confusing. – Tewr Mar 10 '21 at 11:34
1

For iis10

  1. Go to Application Request Routing Cache
  2. Right click and choose Server Proxy Settings
  3. Under the Proxy Settings section change the Time-out(seconds) value
0

Answering my own question, as I finally figured it out.

I added this to applicationHost.config under configuration/system.applicationHost:

<webLimits connectionTimeout="00:10:00" minBytesPerSecond="0" />

But even after saving and pressing Restart under Manage Server in IIS Manager, it still responded with 502 after two minutes.

However, today when I installed some IIS features (Failed Request Tracing) I restarted the IIS service W3SVC and the Web Management Service WMSvc, and suddenly the 502 stopped.

Thomas M. H.
  • 51
  • 1
  • 1
  • 3
0

We had a similar issue which was to do with the default MTU setting on the network card, it was set to 1514 instead of 1500 which was only causing problems with larger posts.

https://blogs.technet.microsoft.com/askpfeplat/2014/12/01/psa-incorrect-mtu-size-causes-connectivity-issues-with-windows-server-2012-and-windows-server-2012-r2/

Gary W
  • 101
  • 2