I have a jQuery datatable
that can be provided with over 70K records.
Unfortunately, the datatable
fails to load anything over 20K records.
I am using the option deferRender
in a workaround attempt, to no avail.
$.ajax({
url: 'api/portmbs.php',
type: 'POST',
data: data,
dataType: 'html',
success: function(data, textStatus, jqXHR)
{
var jsonObject = JSON.parse(data);
var table = $('#example1').DataTable({
"data": jsonObject,
"columns": [
{"data": "column_one"},
{"data": "column_two"},
// more columns...
],
"iDisplayLength": 25,
"order": [[ 1, "desc" ]],
"paging": true,
"scrollY": 550,
"scrollX": true,
"bDestroy": true,
"stateSave": true,
"autoWidth": true,
"deferRender": true
});
},
error: function(jqHHR, textStatus, errorThrown)
{
$('#loadingDiv').hide();
$('#errorModal').modal('show');
$('.message').text('There was an error conducting your search. Please try again.');
return false;
console.log('fail: '+ errorThrown);
}
});
Using the above, an error is triggered with the corresponding error message:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
When I add a 10000
limit to the query that generate the data, the datatable
is successfully rendered.
What am I missing to get the deferRender
option to successfully run and defer the loading of 70K records?