Issue in setting --max-old-space-size=10000
-
I have set NODE_OPTIONS=--max-old-space-size=10000 And then i start jsreport start. using chrome-pdf my it render report within 2 or 3 second that is fine.
But when i start server using pm2 start 12 --node-args="--max_old_space_size=10000"
its taking 30 sec to load report. how can i resolve this issue.
-
Please share the logs.
-
which log pm2 or jsreport server log?
-
JSREPORT LOG
2021-03-26T13:57:40.067Z - info: Starting rendering request 1 (user: axedo_admin)
2021-03-26T13:57:40.070Z - info: Rendering template { name: tableCsv - Explanation Samples, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T13:57:40.818Z - info: pdf-utils is starting pdf processing
2021-03-26T13:57:41.418Z - info: Starting rendering request 2 (user: axedo_admin)
2021-03-26T13:57:41.419Z - info: Rendering template { name: HeaderCsv, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T13:57:41.759Z - info: Rendering request 2 finished in 341 ms
2021-03-26T13:57:41.837Z - info: pdf-utils pdf processing was finished
2021-03-26T13:57:41.837Z - info: Rendering request 1 finished in 1770 ms
2021-03-26T13:57:47.840Z - info: Starting rendering request 3 (user: axedo_admin)
2021-03-26T13:57:47.843Z - info: Rendering template { name: tableCsv - Explanation Samples, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T13:57:48.247Z - info: pdf-utils is starting pdf processing
2021-03-26T13:57:48.782Z - info: Starting rendering request 4 (user: axedo_admin)
2021-03-26T13:57:48.783Z - info: Rendering template { name: HeaderCsv, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T13:57:48.903Z - info: Rendering request 4 finished in 120 ms
2021-03-26T13:57:48.975Z - info: pdf-utils pdf processing was finished
2021-03-26T13:57:48.975Z - info: Rendering request 3 finished in 1135 ms
2021-03-26T14:03:48.691Z - info: Starting rendering request 5 (user: axedo_admin)
2021-03-26T14:03:48.691Z - info: Rendering template { name: tableCsv - Localization probings, recipe: chrome-pdf, engine: handlebars, preview: false }
2021-03-26T14:03:49.012Z - info: pdf-utils is starting pdf processing
2021-03-26T14:03:49.464Z - info: Starting rendering request 6 (user: axedo_admin)
2021-03-26T14:03:49.465Z - info: Rendering template { name: HeaderCsv, recipe: chrome-pdf, engine: handlebars, preview: false }
2021-03-26T14:03:49.629Z - info: Rendering request 6 finished in 164 ms
2021-03-26T14:03:49.677Z - info: pdf-utils pdf processing was finished
2021-03-26T14:03:49.678Z - info: Rendering request 5 finished in 987 ms
2021-03-26T14:08:43.859Z - info: Initializing jsreport@2.11.0 in development mode using configuration file: jsreport.config.json
2021-03-26T14:08:43.860Z - info: Searching for available extensions in /home/ubuntu/aexdo/jsreportapp/
2021-03-26T14:08:43.890Z - info: Extensions location cache contains up to date information, skipping crawling in /home/ubuntu/aexdo/jsreportapp/
2021-03-26T14:08:43.893Z - info: Found 35 extensions
2021-03-26T14:08:44.066Z - warn: "templatingEngines.timeout" configuration is ignored when "reportTimeout" is set
2021-03-26T14:08:44.066Z - info: Setting http-server strategy for rendering
2021-03-26T14:08:45.978Z - info: Using extension handlebars@2.1.0
2021-03-26T14:08:45.982Z - info: Using extension jsrender@2.1.1
2021-03-26T14:08:45.988Z - info: Using extension templates@2.4.0
2021-03-26T14:08:45.990Z - info: Using extension authentication@2.6.1
2021-03-26T14:08:46.014Z - info: Using extension import-export@2.1.1
2021-03-26T14:08:46.050Z - info: Using extension freeze@2.0.0
2021-03-26T14:08:46.052Z - info: Using extension cli@2.2.5
2021-03-26T14:08:46.053Z - info: Using extension express@2.8.1
2021-03-26T14:08:46.133Z - info: Using extension debug@2.1.3
2021-03-26T14:08:46.135Z - info: Using extension tags@2.5.0
2021-03-26T14:08:46.137Z - info: Using extension docx@2.9.0
2021-03-26T14:08:46.140Z - info: Using extension chrome-pdf@1.10.0
2021-03-26T14:08:46.145Z - warn: "extensions.chrome-pdf.timeout" configuration is ignored when "reportTimeout" is set
2021-03-26T14:08:46.190Z - info: Using extension fs-store@2.9.1
2021-03-26T14:08:46.281Z - info: Using extension authorization@2.4.0
2021-03-26T14:08:46.284Z - info: Using extension child-templates@1.4.0
2021-03-26T14:08:46.286Z - info: Using extension browser-client@2.2.2
2021-03-26T14:08:46.288Z - info: Using extension licensing@2.2.3
2021-03-26T14:08:46.290Z - info: Using extension data@2.4.0
2021-03-26T14:08:46.291Z - info: Using extension pptx@0.7.0
2021-03-26T14:08:46.294Z - info: Using extension version-control@1.6.0
2021-03-26T14:08:46.339Z - info: Using extension reports@2.5.1
2021-03-26T14:08:46.342Z - info: Using extension text@2.0.0
2021-03-26T14:08:46.342Z - info: Using extension base@2.0.2
2021-03-26T14:08:46.343Z - info: Using extension static-pdf@0.4.0
2021-03-26T14:08:46.346Z - info: Using extension studio@2.10.1
2021-03-26T14:08:46.412Z - info: Using extension pdf-utils@1.10.1
2021-03-26T14:08:46.479Z - info: Using extension scripts@2.6.0
2021-03-26T14:08:46.482Z - info: Using extension html-to-xlsx@2.8.3
2021-03-26T14:08:46.646Z - info: html-to-xlsx detected chrome as available html engine
2021-03-26T14:08:46.647Z - info: Using extension assets@1.7.0
2021-03-26T14:08:46.653Z - info: Using extension studio-theme-dark@0.3.0
2021-03-26T14:08:46.653Z - info: Using extension scheduling@2.5.0
2021-03-26T14:08:46.703Z - info: Using extension xlsx@2.5.0
2021-03-26T14:08:46.784Z - info: Using extension sample-template@2.6.1
2021-03-26T14:08:46.786Z - info: Using extension resources@2.1.0
2021-03-26T14:08:46.787Z - info: Using extension public-templates@2.2.0
2021-03-26T14:08:46.787Z - info: Using general timeout for rendering (reportTimeout: 600000)
2021-03-26T14:08:46.787Z - info: Using fs provider for template store.
2021-03-26T14:08:46.795Z - info: fs store is persisting using fs
2021-03-26T14:08:46.797Z - info: fs store is synchronizing using fs
2021-03-26T14:08:46.813Z - info: fs store is loading data
2021-03-26T14:08:46.888Z - info: fs store is initialized successfully
2021-03-26T14:08:46.910Z - info: Creating default express app.
2021-03-26T14:08:46.928Z - info: jsreport server successfully started on http port: 5488
2021-03-26T14:08:46.928Z - info: fs store emits sockets to synchronize underlying changes with studio
2021-03-26T14:08:46.943Z - info: Verifying license key free
2021-03-26T14:08:47.065Z - info: Using enterprise trial license
2021-03-26T14:08:47.073Z - info: reporter initialized
2021-03-26T14:08:51.076Z - info: Starting rendering request 1 (user: axedo_admin)
2021-03-26T14:08:51.079Z - info: Rendering template { name: tableCsv - Explanation Samples, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T14:08:51.631Z - info: pdf-utils is starting pdf processing
2021-03-26T14:08:52.159Z - info: Starting rendering request 2 (user: axedo_admin)
2021-03-26T14:08:52.160Z - info: Rendering template { name: HeaderCsv, recipe: chrome-pdf, engine: handlebars, preview: true }
2021-03-26T14:08:52.510Z - info: Rendering request 2 finished in 351 ms
2021-03-26T14:08:52.581Z - info: pdf-utils pdf processing was finished
2021-03-26T14:08:52.582Z - info: Rendering request 1 finished in 1506 ms
-
Thank you. I don't see it would take 20s to render...
Rendering request 1 finished in 1770 ms Rendering request 1 finished in 1506 ms
The pm2 shouldn't affect the performance. Not sure what could be wrong.
Please try to elaborate more in detail.