Invalid JSON response. Large Data problem!
Invalid JSON response. Large Data problem!

MY code works correctly with small data
nut not working when retrieving large amount of data from table .
Is there any limit in ajax response
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
As far as I know there are no limits in place in Datatables. There may be limits in the data size that can be sent form the server or maybe the browser.
What happens?
What errors do you get?
Basically you need to follow the path of your data and look at server and client logs for errors to determine the problem. This FAQ provides some guidelines are number of rows and what can be done to improve speed.
https://datatables.net/faqs/index#speed
Kevin
Error : DataTables warning: table id=example - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
var table = $('#example').DataTable({
"stateSave": true,
"lengthMenu": [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ],
ajax: {
'url': '<?php echo base_url();?>Admin/view_ajax',
'type': 'POST',
'data': function(data){
var status = $('#filerByStatus').val();
data.filerByStatus = status;
}
},
});
and my codeignitor controller is
` public function view_ajax(){
$this->load->model("functions");
$tablename = $this->session->tablename;
$fields = $this->db->list_fields($tablename);
$filerByStatus = $this->input->post('filerByStatus');
inthat code if ($i > 7 ) it works correctly ....
So I think it was with data problem
I use 2500 rows and 55 columns
Did you follow the troubleshooting steps provided in link in the error?
http://datatables.net/tn/1
Likely you will see an error in your server script indicating the problem.
I'm not sure what
if ($i > 7 )
is doing so won't be much help with your server script. Maybe someone else has an idea.Kevin
No error message was displayed
But this code works correctly with small data
When you followed the steps in the link http://datatables.net/tn/1 what did you find?
We need to narrow down which code is not working with the large data set. If Datatables is reporting invalid JSON then it leads me to believe the server is responding with an error instead of JSON data.
Kevin
IF there is no response data then that would indicate something is going wrong in your server script.
Kevin
Malformed UTF-8 characters, possibly incorrectly encoded
now I;m getting this error
Where are you seeing that error?
What change did you make to for the error to occur?
Kevin
` $x= json_encode(
SSP::simple( $_GET, $sql_details, $tablename, $primaryKey, $columns ),0,5000000
);
Is your DB set for UTF-8?
My recommendation is to search Stackoverflow for the error. Seems there are many discussion about this error. Maybe you can find a solution based on your DB and environment.
Kevin