Hi Jan_blaha,
In general, Chrome-pdf is supposed to have good performance or response times but we are not seeing that. For us Phantom-pdf is giving good numbers. Just want to know if we are missing anything.
Hi Jan_blaha,
In general, Chrome-pdf is supposed to have good performance or response times but we are not seeing that. For us Phantom-pdf is giving good numbers. Just want to know if we are missing anything.
Hi jan_blaha,
Could you please help us here?
Thank u
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,
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.
I am analysing the performance of phantomjs and headless chrome and in general opinion is that "headless chrome" performs faster with less memory. But the testing i have done shows opposite. Any clarification on this would be helpful....
Hi,
I have tested with all these recipes and found that phantom-pdf rendering times are quite less when compared to other two. That means phantom-pdf performs better than other two for same set of data and on the same system configuration. We have used 4 cores and 16 GB RAM.
The configurations i used for all 3 recipes are:
"electron-pdf": {
"strategy": "electron-ipc",
"numberOfWorkers": 2,
"pingTimeout": 6000000,
"timeout": 6000000
}
"templatingEngines": {
"strategy": "http-server",
"numberOfWorkers": 2,
"forkOptions": {
"execArgv": ["--max-old-space-size=6096"]
}
}
"phantom-pdf": {
"numberOfWorkers": 2,
"timeout": 6000000,
"strategy": "phantom-server"
}
"chrome-pdf": {
"strategy": "chrome-pool",
"numberOfWorkers": 2
}
Which according to you is the best report rendering recipe that we can use?
In one of the responses
https://forum.jsreport.net/topic/1559/electron-pdf-issue-in-jsreport/5, chrome-pdf is suggested. But between chrome-pdf and phantom-pdf which would be the better recipe?
Thank you in advance
This is the use case i am trying to achieve in JSReport
Thanks in advance
Installed phantomjs version
phantomjs@1.9.20 install D:\jsreport-server\jsreportapp\node_modules\phantomjs
node install.js
PhantomJS not found on PATH
Download already available at C:\Users\VIRAJI~1.SAR\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing D:\jsreport-server\jsreportapp\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\VIRAJI~1.SAR\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1588104820710\phantomjs-1.9.8-windows -> D:\jsreport-server\jsreportapp\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at D:\jsreport-server\jsreportapp\node_modules\phantomjs\lib\phantom\phantomjs.exe
npm WARN pdfjs-dist@2.0.489 requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN worker-loader@1.1.1 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jsreport-server@ No description
npm WARN jsreport-server@ No repository field.
npm WARN jsreport-server@ No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
7 packages are looking for funding
run npm fund
for details
found 36 vulnerabilities (13 low, 16 moderate, 7 high)
run npm audit fix
to fix them, or npm audit
for details
JSreport Config:
{
"httpPort": 5488,
"store": {
"provider": "fs"
},
"blobStorage": {
"provider": "fs"
},
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"allowLocalFilesAccess": true,
"reportTimeout": 360000,
"chrome": {
"strategy": "chrome-pool"
},
"templatingEngines": {
"strategy": "http-server",
"numberOfWorkers": 8
},
"extensions": {
"phantom-pdf": {
"strategy": "phantom-server",
"numberOfWorkers": 8
},
"electron-pdf": {
"pingTimeout": 60000,
"timeout": 180000,
"portLeftBoundary": 1000,
"portRightBoundary": 2000,
"strategy": "electron-server",
"numberOfWorkers": 2
},
"express": {
"inputRequestLimit": "500mb"
},
"authentication": {
"cookieSession": {},
"admin": {
"username": "admin",
"password": "password"
},
"enabled": false
},
"sample-template": {
"createSamples": true
},
"scripts": {
"strategy": "http-server"
}
}
}
I have 4 cores... that is why took 2 workers per Core/CPU