KoolReport's Forum

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

CloudExport with chromeHeadlessio is very slow and throws 500 error #3375

Open FinChamps opened this topic on on Nov 12 - 2 comments

FinChamps commented on Nov 12

Hello team,

We are using the Laravel 11 with Koolreport "koolreport/cloudexport": "4.2.0".

I have implemented a feature that exports PDF report files. While the report class displays the results quickly in the browser when we render the view, I believe that the service we are using (Cloud-Export with chromeHeadlessio) takes too long to prepare the report and send it to the browser.

We would like to continue using "ChromeHeadlessio". Could you please assist me with the following specific queries?

Please check. I have shared the code below. The code seems to work correctly, but I believe the service takes time.

$reportClass->run()
    ->cloudExport($reportView)
    ->chromeHeadlessio(config('services.chrome_headless_io_token_key'))
    ->settings([
        "pageWaiting"=>"networkidle2",
        "useLocalTempFolder" => true,
        "autoDeleteLocalTempFile" => true,
    ])
    ->pdf([
        "format" => "A4",
        "zoom" => 0.5,
    ])
    ->toBrowser($fileName);

Please let me know if we are missing anything or need any details.

Regards, FinChamps

FinChamps commented on Nov 12

I forgot to mention that it throws a "504 Gateway Time-out" error. (I mentioned "500 errors" in my task, my bad!)

Sebastian Morales commented on Nov 13

It could be either your data is rather long that rendering PDF takes time or there is a problem with Laravel token when submitting form to export. I guess you can test those by 2 methods:

  1. Try our cloud export example from your environment without using Laravel:

    https://www.koolreport.com/examples/reports/cloudexport/footer_header/

  2. Try to export with a limited number of data rows, such as 5 or 10 rows only.

Let us know the result.

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
None yet

Export