我有一个页面,允许用户上传和映射CSV文件。在完成之后,行将通过后续调用发送到不同服务器上的页面。经过近6,00次调用(5787正好)后,我开始出现控制台错误“无法加载资源:net :: ERR_INSUFFICIENT_RESOURCES”。jQuery post调用导致“无法加载资源:net :: ERR_INSUFFICIENT_RESOURCES”
我试着在CSV文件中运行100行的页面,它工作得很好......但是当我尝试一个大列表(超过10,000行)时,它冻结了。
这里是使得后调用的代码:
for (var i = 0; i < manifestRows.length; i++)
{
$.post('http://www.otherserver.com/subfolder/handler.php', { tblName: 'foobar', thing1: manifestRows[i][0], thing2: manifestRows[i][1], thing3: manifestRows[i][2], thing4: manifestRows[i][3], thing5: manifestRows[i][4], thing6: manifestRows[i][5], thing7: manifestRows[i][6], thing8: manifestRows[i][7], thing9: manifestRows[i][8], thing10: manifestRows[i][9], thing11: manifestRows[i][10], thing12: manifestRows[i][11], thing13: manifestRows[i][12], thing14: manifestRows[i][13], thing15: manifestRows[i][14], thing16: manifestRows[i][15], thing17: manifestRows[i][16], thing18: manifestRows[i][17] }, function(data) {
if (data.length == 0)
{
var currentProcessing = $('#processingCurrent').html();
$('#processingCurrent').html(parseInt(currentProcessing) + 1);
var progress = Math.ceil((parseInt(currentProcessing)/manifestRows.length) * 100);
if (progress == 99)
progress = 100;
progress = progress + '%'
$("#progressBar").width(progress).html(progress);
if (progress == '100%')
{
$('#processdingDiv').hide();
$('#allDone').show();
}
}
else
alert(data);
});
}
有一些代码,我可以把无论是在用户端,或其他的服务器以防止此Insuffiecient资源错误的存在的呢?