Phantom-pdf report rendering of data of 16MB



  • Hi,
    Good morning
    I am trying to render report using phantom-pdf for 16MB data.
    with phantom-pdf using "dedicated-process" and
    "templatingEngines": {
    "strategy": "http-server",
    "numberOfWorkers": 4,
    "forkOptions": {
    "execArgv": ["--max-old-space-size=6096"]
    }
    }
    I am getting this error:
    2020-05-21T19:27:19.729Z - debug: Base url not specified, skipping its injection.
    2020-05-21T19:27:19.789Z - debug: Rendering engine handlebars using http-server strategy
    2020-05-21T19:28:58.876Z - debug: Compiled template not found in the cache, compiling
    2020-05-21T19:29:00.091Z - debug: Executing recipe phantom-pdf
    2020-05-21T19:30:10.600Z - error: Rendering request 1 finished with error in 296006 ms
    2020-05-21T19:30:10.603Z - error: Error when processing render request 1 Command failed: D:\JSReport\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any D:\JSReport\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\Users\VIRAJI~1.SAR\AppData\Local\Temp\jsreport\autocleanup\360491ab-0000-4acb-97d1-1247a1ab59a1settings.html
    Error: Command failed: D:\JSReport\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any D:\JSReport\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\Users\VIRAJI~1.SAR\AppData\Local\Temp\jsreport\autocleanup\360491ab-0000-4acb-97d1-1247a1ab59a1settings.html

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:310:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
    

    2020-05-21T19:30:10.621Z - error: Error during processing request at http://localhost:5488/api/report

    and with phantom-pdf set to "http-server", I get EConnreset error. I have used time out as 100 minutes
    I have gone through your forums where it mentions about using these options to improve performance. But both the options are failing for me.
    Can you please guide me here?
    Thank you very much.



  • It looks phantomjs crashes after 5 minutes without an error reported to jsreport.
    It could be out of memory problem. How many pages do you expect to be rendered?

    Do you get this working with chrome-pdf recipe?



  • The html file that is generated at c:\users.....\autocleanup folder has 48MB size. The pdf file has around 3000 pages with each record data something like this: divided into 6 columns
    5/13/2020 4:00:00AM 5/13/2020 4:00:00AM 1 Generating PDF 6.178.63.58 End Point Mapper

    I have tried chrome-pdf also. I am sending request using postman with response time and data set to "0". That is no limit. In JSReport server I donot see any error and neither do i get response on post man.
    JSReport logs:
    2020-05-21T20:06:12.811Z - debug: Base url not specified, skipping its injection.
    2020-05-21T20:06:12.866Z - debug: Rendering engine handlebars using http-server strategy
    2020-05-21T20:07:27.672Z - debug: Compiled template not found in the cache, compiling
    2020-05-21T20:07:28.768Z - debug: Executing recipe chrome-pdf
    2020-05-21T20:07:30.653Z - debug: Converting with chrome HeadlessChrome/79.0.3945.0 using dedicated-process strategy
    2020-05-21T20:07:31.166Z - debug: Page request: GET (document) file:///C:/Users/VIRAJI~1.SAR/AppData/Local/Temp/jsreport/autocleanup/6c608fa7-a966-4553-930d-b9d170c7c57f-chrome-pdf.html
    2020-05-21T20:26:32.794Z - debug: Page request finished: GET (document) file:///C:/Users/VIRAJI~1.SAR/AppData/Local/Temp/jsreport/autocleanup/6c608fa7-a966-4553-930d-b9d170c7c57f-chrome-pdf.html
    It just stops here.

    I am using the default chrome-pdf settings in jsreport config.
    Please help us with this or give some pointers or directions as we are not bale to process records above > 20MB.



  • Hi jan_blaha,
    Could you please help us here?

    Thank u


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.