Why table is crashing when use ServerSide

Why table is crashing when use ServerSide

vatcovatco Posts: 7Questions: 4Answers: 0

Hi all,

I have a strange situation with my DataTable setup. I have a table which for some reason crashes when I use ServerSide and I load more than 6 columns or sometimes it breaks only on some columns. For ServerSide I use Coldfusion 9. If I disable serverside everything works perfect. Below is the JS. The XHR response is good if I load only the below columns, I need to load 17 columns but if I add any other column the table crashes and I get the 500 internal server error. ..but when I am trying to debug this in the server side I don't have any error in the logs.Does ServerSide has a limit on columns that I can Display? or do I need to create an extra function to load the columns when the table enables scroolX?

$(document).ready(function() {
            var table = $('##table1').DataTable( 
            {
                "ajax":  
                {
                    'url': 'source.cfm',
                    'Type' : 'POST',
                    "dataType": "json",
                    /*"data":  
                    {
                        sel: '#sel#',
                        group: '#group#',
                        search: '#search#',
                    }*/
                }, 
                "processing": true,
                "serverSide": true,
                "cache": false,
                'paging':true,
                'pagingType':"full_numbers",
                "select": true,
                "scrollY":"700px",
                "language": {"search": "Search Table:"},
                "select" :true,
                "pageLength":100,
                "lengthMenu": [100, 200, 300, 400, 500 ],
                /*"order": [[1, 'asc']],*/
                "columns":
          { "data": "Num", "name" : "Num", "title" : "Num"  },
          { "data": "Company", "name" : "Company", "title" : "Company"  },
          { "data": "Portfolio", "name" : "Portfolio", "title" : "Portfolio"},
          { "data": "Column3", "name" : "Column3", "title" : "Column3"  },
          { "data": "Column4", "name" : "Column4", "title" : "Column4"  },
          { "data": "Reference", "name" : "Reference", "title" : "Reference"  },
          { "data": "UniqueID", "name" : "UniqueID", "title" : "UniqueID"  }],

                'dom': 'lBfrtip',
              });
        $(".dataTables_length select").selectpicker(
            {
            width : '80px'
            });

Thanks!

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    500 internal server error

    This is an error generated by your server. You will need to look at your server logs to determine the problem. Its not an error generated by Datatables.

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @vatco ,

    There isn't a limit to the number of columns from DataTables point of view, so it must be something in the server side script. We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.