Random time ERR_EMPTY_RESPONSE in AJAX calls

I am developing a small CMS / social network for one school, it is very complex and works almost completely with AJAX. My problem is that random calls are blocked and a browser error is displayed :: ERR_EMPTY_RESPONSE (Chrome, Firefox, IE, ...). The urls are fine, and if I repeat the action ending with Error, it now works fine ...

This happens at random times and I have no idea what might be the problem or where I can start looking.

The code I use is simple like this:

$.ajax({
    type: 'POST',
    url: 'http://...',
    cache: false,
    data: array(),
    dataType: 'html',
    async: true,
    success: function(h){ /* ... */ }
});

this happens in the urls with the database queries and the urls of the main html responses.

Chrome: "Failed to load resource network :: ERR_EMPTY_RESPONSE"

Chrome: "POST> [URL] net :: ERR_EMPTY_RESPONSE"

Firefox: "NetworkError 404 not found"

?

+4
1

, Framework7 xhr api. . " ". , , "undefined", .

, , , .

0

All Articles