I have to fill a partial view with a lot of data. I first do an ajax call on the server:
$.ajax({
url: '/Monitoring/_Thresholds?workspaceID=' + workspaceID,
type: "POST",
data: new FormData(form),
cache: false,
contentType: false,
processData: false,
}).success(function (result) {
resultsDiv.innerHTML = result;
}).error(function (response) {
resultsDiv.innerHTML = response.responseText;
});
However due to the large number of data it takes too long to do this and I get:
HTTP Error 502.3 - Bad Gateway
The specified CGI application encountered an error and the server terminated the process.
Most likely causes:
The CGI application did not return a valid set of HTTP errors. A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
Things you can try:
Use DebugDiag to troubleshoot the CGI application. Determine if a proxy or gateway is responsible for this error.
The BL stuff takes 2-3 seconds but rendering the view a lot more.
Is there any way to solve this?