1

I have just set up a web farm with Application Request Routing on IIS 8.5, with Load Balance connecting to two servers. The static page HelloWorld.html and the first login page looks fine. However when the submit button is hit, whenever a code behind is involved it takes a long time to load. I've modified the timeout value from 30s to 300s, then it loads for a few minutes and gave me a

502 - Web server received an invalid response while acting as a gateway or proxy server.

I've enabled trace log but not sure where can I find the exact problem. In the summary it's showing

MODULE_SET_RESPONSE_ERROR_STATUS

ModuleName ApplicationRequestRouting

Notification EXECUTE_REQUEST_HANDLER

HttpStatus 502

HttpReason Bad Gateway

HttpSubStatus 3

ErrorCode 2147954430


SET_RESPONSE_ERROR_DESCRIPTION

ErrorDescription The connection with the server was terminated abnormally


Anyone had similar experience and is able to give me a hint?

ydoow
  • 111
  • 1
  • 4
  • Hi, I am having the same issue. Did you manage to solve this? Thanks – albattran Feb 10 '17 at 05:34
  • I found it's a probem in Session State Management. Check out the following links and see if that helps your situation. https://msdn.microsoft.com/en-us/library/ms972338.aspx and https://dotnetcodr.com/2013/07/01/web-farms-in-net-and-iis-part-5-session-state-management/ – ydoow Feb 10 '17 at 05:52
  • Thanks for getting back to me, we did not use sessions so that was not the issue. We have managed to solve the problem, I added our solution as an answer below. – albattran Feb 11 '17 at 23:21

1 Answers1

-1

I have discovered that the problem we had was due to a conflict between ARR and ASP.net MVC running on the same site.
It turns out, that if you process request parameters for whatever reason in your main site (e.g. filters, or global.asax) it will clear out the post parameters in the request sent by ARR, and hence resulting in a timeout.

You can solve it in one of two ways as follows.

  1. Put ARR in a separate process (if you can)
  2. Or make sure whatever filter you have checks the path being used in ARR and avoid touching the request parameters.

Not sure if this is the same issue you were having but I am putting here as an answer if someone else had the same problem as I did, with similar symptoms to you.

Thomas
  • 4,225
  • 5
  • 23
  • 28