I am getting below error in the console of browsers.
Failed to load resource: net::ERR_EMPTY_RESPONSE
My ajax call works for all the button clicks, but this error is coming only for one button (lets say testExt button).On clicking on these buttons, a background script runs and execute some tests. The only difference is that this testExt takes more time to complete its execution (nearly 4 min 27 secs) but the response comes to client at 4 min 16 secs in the error
block of ajax even when the script is successfully executed at server's end.
console shows below error:
Object {readyState: 0, responseText: "", status: 0, statusText: "error"}
The Ajax code:
$.ajax({
type : "Get",
url : "resultValue.htm",
cache: false,
data : "testName=" + name,
success : function(response) {
// success logic here
},
error: function(jqXHR, textStatus){
console.log(jqXHR);
alert('There has been server side error. Please contact TechEng team to get this fixed.')
}
});
The response which is returned from such request is just one line string:
/xxxx/reports/2016-06-15/07-03-53-237-r1Qn/xxx-smoketest-report.html
I googled some questions on SO but I am not sure if its a java memory issue on server side as I tried to increase memory size as well. Please help me to understand what's going wrong. Am I missing certain scenario to handle this ajax
request
When I directly hit the server API, i get following response on browser:
FireFox:
Chrome