I have a C# ASP.NET Webforms website running on IIS7. It is a report creation application that queries the SQL Server database, gets the data, parses it in to an Excel document.
The query itself doesn't take too long, but writing to the Excel takes a while when the query is very large (50,000 rows).
Now for the problem, when I run the report app, I get the report with in a few minutes but when some users run it, the report returns 502 Bad Gateway. This only happens for large reports.
I assume that it has to do with a timeout? Even though no matter which timeout command I change, the gateway error comes up with in two minutes.