KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Receiving 504 Gateway time-out - tried with 1150 and 2707 records #1744

Open paulo opened this topic on on Dec 3, 2020 - 4 comments

paulo commented on Dec 3, 2020

Hi, I am trying to show a report that contains or 1150 or 2707 records from the database. System keeps showing 504 Gateway time-out. I've increased the timeout on php as suggested by another post. I am using DataTables component to present the data.

Any suggestion is appreciated. thank you

 DataTables::create(array(
        "dataStore" => $this->dataStore('ClientVisitorList'),
        "options" => array(
            "fixedHeader" => true,
            "searching" => true,
            "colReorder" => true,
        ),

        "columns" => array(
Sebastian Morales commented on Dec 3, 2020

Paulo, pls print out your datastore first in your report view without using DataTables. We should make sure the data is there:

//MyReport.view.php
print_r($this->dataStore('ClientVisitorList')->data());

Let us know the result. Cheers,

paulo commented on Dec 3, 2020

thanks. I am changing the query for now as there was one select inside of the select which was slowing down the whole thing. I will try after the changes in production and get back to you, but it seems if the query runs faster, the report can present locally. (which is strange because the query only took 6 seconds to run).

Sebastian Morales commented on Dec 4, 2020

This is your web server's timeout, not database's time out. You could try to increase your server's timeout or php processing time. Cheers,

paulo commented on Dec 4, 2020

thanks. Yes, I had increased on pphp.ini max_execution_time to 300 I will try this denormalization to remove this select inside of a select and see what happens.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None