always getting 503 response when using more than 67 column

always getting 503 response when using more than 67 column

donihardiandonihardian Posts: 1Questions: 1Answers: 0

What is the common issue if we always getting 503 response when using ajax datatable with more than 67 columns?
If I put less than 67 columns the error did not appear, but when I added 1 column from 67 column before, it's appear again

Here is my code:
client side,

var tblPhysic = {
dom: 'Brt',
processing: true,
serverSide: true,
retrieve: true,
pageLength: 10,
ajax: {
url: "my-endpoint",
data: function (d) {
d.transactionid = $('#detailtransactionid').val()
}
},
order: [],
columns: [
{ data: 'medicalrecord', name: 'medicalrecord', className: 'text-center' },
{ data: 'riwayat_kesehatan', name: 'riwayat_kesehatan' },
{ data: 'keluhan_sekarang', name: 'keluhan_sekarang' },
{ data: 'hpht', name: 'hpht' },
{ data: 'riwayat_kesehatan_sebelumnya', name: 'riwayat_kesehatan_sebelumnya' },
{ data: 'riwayat_inap_operasi', name: 'riwayat_inap_operasi' },
{ data: 'patah_tulang', name: 'patah_tulang' },
{ data: 'riwayat_kesehatan_keluarga', name: 'riwayat_kesehatan_keluarga' },
{ data: 'asthma', name: 'asthma' },
{ data: 'penyakit_paru', name: 'penyakit_paru' },
{ data: 'penyakit_jantung', name: 'penyakit_jantung' },
{ data: 'penyakit_tekanan_darah', name: 'penyakit_tekanan_darah' },
{ data: 'penyakit_stroke', name: 'penyakit_stroke' },
{ data: 'penyakit_kencing_manis', name: 'penyakit_kencing_manis' },
{ data: 'penyakit_ginjal', name: 'penyakit_ginjal' },
{ data: 'penyakit_haemorrhoid', name: 'penyakit_haemorrhoid' },
{ data: 'penyakit_kanker', name: 'penyakit_kanker' },
{ data: 'alergi', name: 'alergi' },
{ data: 'penyakit_lainnya', name: 'penyakit_lainnya' },
{ data: 'riwayat_hazard', name: 'riwayat_hazard' },
{ data: 'riwayat_kecelakaan_kerja', name: 'riwayat_kecelakaan_kerja' },
{ data: 'kebiasaan',name: 'kebiasaan' },
{ data: 'olahraga', name: 'olahraga' },
{ data: 'merokok', name: 'merokok' },
{ data: 'alkhohol', name: 'alkhohol' },
{ data: 'pemeriksaan_fisik', name: 'pemeriksaan_fisik' },
{ data: 'tb', name: 'tb', className: 'text-center' },
{ data: 'bb', name: 'bb', className: 'text-center' },
{ data: 'bmi', name: 'bmi', className: 'text-center' },
{ data: 'bmi_conclusion', name: 'bmi_conclusion', className: 'text-center' },
{ data: 'normal_weight', name: 'normal_weight', className: 'text-center' },
{ data: 'tekanan_darah', name: 'tekanan_darah', className: 'text-center' },
{ data: 'nadi', name: 'nadi', className: 'text-center' },
{ data: 'suhu', name: 'suhu', className: 'text-center' },
{ data: 'pernafasan', name: 'pernafasan', className: 'text-center' },
{ data: 'mata', name: 'mata' },
{ data: 'butawarna', name: 'butawarna' },
{ data: 'kacamata', name: 'kacamata' },
{ data: 'ketajaman_penglihatan', name: 'ketajaman_penglihatan' },
{ data: 'tanpa_kacamata', name: 'tanpa_kacamata' },
{ data: 'dengan_kacamata', name: 'dengan_kacamata' },
{ data: 'kelainan_mata_lainnya', name: 'kelainan_mata_lainnya' },
{ data: 'tht', name: 'tht' },
{ data: 'telinga', name: 'telinga' },
{ data: 'telinga_bentuk', name: 'telinga_bentuk' },
{ data: 'telinga_lubang', name: 'telinga_lubang' },
{ data: 'membran_tympani', name: 'membran_tympani' },
{ data: 'hidung', name: 'hidung' },
{ data: 'tenggorokan', name: 'tenggorokan' },
{ data: 'faring', name: 'faring' },
{ data: 'tonsil', name: 'tonsil' },
{ data: 'tenggorokan_lainlain', name: 'tenggorokan_lainlain' },
{ data: 'mulut', name: 'mulut' },
{ data: 'oral_hygiene', name: 'oral_hygiene' },
{ data: 'lidah', name: 'lidah' },
{ data: 'gusi', name: 'gusi' },
{ data: 'gigi', name: 'gigi' },
{ data: 'leher', name: 'leher' },
{ data: 'leher_bentuk', name: 'leher_bentuk' },
{ data: 'tyroid', name: 'tyroid' },
{ data: 'thorax', name: 'thorax' },
{ data: 'thorax_bentuk', name: 'thorax_bentuk' },
{ data: 'paru_paru', name: 'paru_paru' },
{ data: 'jantung', name: 'jantung' },
{ data: 'jantung_lainlain', name: 'jantung_lainlain' },
{ data: 'abdomen', name: 'abdomen' },
{ data: 'bentuk', name: 'bentuk' },
{ data: 'palpasi', name: 'palpasi' },
{ data: 'auskultasi', name: 'auskultasi' },
{ data: 'hati', name: 'hati' },
{ data: 'limpa', name: 'limpa' },
{ data: 'ginjal', name: 'ginjal' },
{ data: 'test_ketok', name: 'test_ketok' },
{ data: 'ballotement', name: 'ballotement' },
{ data: 'ballotement_lainlain', name: 'ballotement_lainlain' },
{ data: 'rektal', name: 'rektal' },
{ data: 'haemorrhoid', name: 'haemorrhoid' },
{ data: 'anus_rectum_perianal', name: 'anus_rectum_perianal' },
{ data: 'extremitas', name: 'extremitas' },
{ data: 'tulang_sendi', name: 'tulang_sendi' },
{ data: 'otot_tonus', name: 'otot_tonus' },
{ data: 'jari_jari', name: 'jari_jari' },
{ data: 'tangan', name: 'tangan' },
{ data: 'kaki', name: 'kaki' },
{ data: 'neurologis', name: 'neurologis' },
{ data: 'reflex_fisiologis', name: 'reflex_fisiologis' },
{ data: 'reflex_patologis', name: 'reflex_patologis' },
{ data: 'reflex_aktifitas', name: 'reflex_aktifitas' },
{ data: 'kekuatan_motorik', name: 'kekuatan_motorik' },
{ data: 'kelainan_syaraf_pusat', name: 'kelainan_syaraf_pusat' },
{ data: 'kelainan_syaraf_tepi', name: 'kelainan_syaraf_tepi' },
{ data: 'pemeriksaan_kulit', name: 'pemeriksaan_kulit' },
{ data: 'warna_kulit', name: 'warna_kulit' },
{ data: 'kelainan_kulit', name: 'kelainan_kulit' },
{ data: 'riwayat_pengobatan', name: 'riwayat_pengobatan' },
{ data: 'varises', name: 'varises' },
{ data: 'berat_ideal', name: 'berat_ideal' },
{ data: 'lingkar_perut', name: 'lingkar_perut' },
{ data: 'saran', name: 'saran' },
{ data: 'pemeriksaan_payudara', name: 'pemeriksaan_payudara' },
{ data: 'riwayat_epilepsi', name: 'riwayat_epilepsi' },
{ data: 'riwayat_schizophernia', name: 'riwayat_schizophernia' },
{ data: 'paralisis', name: 'paralisis' },
{ data: 'starbismus', name: 'starbismus' },
{ data: 'amputasi', name: 'amputasi' },
{ data: 'paraplegia', name: 'paraplegia' },
{ data: 'hemiplegi', name: 'hemiplegi' },
{ data: 'adnexitis', name: 'adnexitis' },
{ data: 'harvard_test', name: 'harvard_test' },
{ data: 'refraksi_mata', name: 'refraksi_mata' }
],
};

$('#tblPhysic').DataTable(tblPhysic);

on server-side,
$query = McuTransactionPhysic::query();

    return DataTables::of($query)->removeColumn('id')->make();

Answers

  • kthorngrenkthorngren Posts: 21,342Questions: 26Answers: 4,954

    Maybe the URL being sent, using server side processing, is too big for the server with more than 67 columns. You might need to change the ajax option to use POST using the jQuery Ajax() type option.
    Something like this:

    ajax: {
      url: "my-endpoint",
      type: "POST",
      data: function (d) {
        d.transactionid = $('#detailtransactionid').val()
      }
    },
    

    You will need to change your server script to get the POST paramaters.

    Kevin

Sign In or Register to comment.