is regression issue is fixed in jsreport 3.3.0?
-
Hi sir,
We are using jsreport 3.2.0 version and mongodb as our store for storing templates(ealier it was aws s3).Also we are rendering our report using report extension method for async rendering.And there was regression issue in 3.2.0 that means the requested data becomes empty in before render function .So you were asked me to add numberOfWorkers to 1.Now requested data is not empty due to single numberOfWorkers.
My question is,
*Why jsreport throw timeOut issue if we run same report from multiple system at the same time.(numberOfWorker is 1).?
- Since our application is multi-tenant application so there is huge chance to run same report by mutiple users at same time.How can i fix this issue?
- If i try to increase number of worker then what will be its maximum value.(Our application is multi-tenant application).
- Is the above mentioned issues are mainly due to regression also this new version 3.3.0 will resolve my above problems?
*What happens If we try to run same report multiple times without waiting to render the repo
rt.Will it crash the jsreport rendering due to many request for the same report?- In our application we notify the client using aws websocket (in order to acknowledge the client that report rendering is complete) and we are handling this from afterRender function of jsreport .So in this senario what happens if we run same report multiple times before compleing any report?
Also can you please tell me why iam getting below error?
message
"2022-01-14T17:14:54.523Z - [32minfo[39m: Initializing jsreport (version: 3.2.0, configuration file: jsreport.config.json, nodejs: 16.13.1)"
2022-01-14T17:14:54.532Z - [32minfo[39m: Searching for available extensions in /app/
"2022-01-14T17:14:54.535Z - [32minfo[39m: Extensions location cache not found, crawling directories"
2022-01-14T17:14:56.117Z - [32minfo[39m: Found 37 extension(s)
2022-01-14T17:14:56.214Z - [34mdebug[39m: Writing extension locations cache to /tmp/jsreport/core/locations.json
2022-01-14T17:14:56.215Z - [34mdebug[39m: Discovered 37 extensions
2022-01-14T17:14:56.614Z - [32minfo[39m: Using extension authentication@3.1.0
2022-01-14T17:14:57.311Z - [34mdebug[39m: Extension authentication@3.1.0 was disabled
2022-01-14T17:14:57.312Z - [32minfo[39m: Using extension base@3.0.0
2022-01-14T17:14:57.319Z - [32minfo[39m: Using extension child-templates@3.0.1
2022-01-14T17:14:57.320Z - [32minfo[39m: Using extension cli@3.0.0
2022-01-14T17:14:57.323Z - [32minfo[39m: Using extension components@3.1.0
2022-01-14T17:14:57.325Z - [32minfo[39m: Using extension data@3.0.1
2022-01-14T17:14:57.326Z - [32minfo[39m: Using extension express@3.2.0
2022-01-14T17:14:58.312Z - [32minfo[39m: Using extension freeze@3.0.1
2022-01-14T17:14:58.314Z - [32minfo[39m: Using extension fs-store@3.0.0
2022-01-14T17:14:58.702Z - [34mdebug[39m: Extension fs-store@3.0.0 was disabled
2022-01-14T17:14:58.702Z - [32minfo[39m: Using extension handlebars@3.0.0
2022-01-14T17:14:58.704Z - [32minfo[39m: Using extension import-export@3.0.2
2022-01-14T17:14:58.718Z - [32minfo[39m: Using extension jsrender@3.0.0
2022-01-14T17:14:58.719Z - [32minfo[39m: Using extension licensing@3.0.1
2022-01-14T17:14:58.802Z - [32minfo[39m: Using extension localization@3.1.0
2022-01-14T17:14:58.803Z - [32minfo[39m: Using extension mongodb-store@3.0.0
2022-01-14T17:14:59.506Z - [32minfo[39m: Connecting mongo to mongodb://administrator:abcd1234@docdb.cgjgb1ms9vzj.ap-south-1.docdb.amazonaws.com:27017/Logipulse-reports?retryWrites=false
2022-01-14T17:14:59.716Z - [32minfo[39m: Connection successful
2022-01-14T17:14:59.723Z - [32minfo[39m: Using extension npm@3.1.0
2022-01-14T17:14:59.726Z - [32minfo[39m: Using extension pdf-utils@3.1.0
2022-01-14T17:14:59.728Z - [32minfo[39m: Using extension reports@3.0.0
2022-01-14T17:14:59.732Z - [32minfo[39m: Using extension tags@3.0.0
2022-01-14T17:14:59.802Z - [32minfo[39m: Using extension text@3.0.0
2022-01-14T17:14:59.804Z - [32minfo[39m: Using extension version-control@3.0.1
2022-01-14T17:14:59.821Z - [32minfo[39m: Using extension assets@3.1.0
2022-01-14T17:14:59.903Z - [32minfo[39m: Using extension authorization@3.1.0
2022-01-14T17:14:59.907Z - [34mdebug[39m: Extension authorization@3.1.0 was disabled
2022-01-14T17:14:59.907Z - [32minfo[39m: Using extension browser-client@3.1.0
2022-01-14T17:14:59.910Z - [32minfo[39m: Using extension chrome-pdf@3.1.0
"2022-01-14T17:14:59.913Z - [34mdebug[39m: Chrome strategy is chrome-pool, numberOfWorkers: 1"
"2022-01-14T17:14:59.914Z - [34mdebug[39m: Chrome custom launch options are executablePath=/usr/lib/chromium/chrome, args=--no-sandbox,--disable-dev-shm-usage"
2022-01-14T17:14:59.914Z - [32minfo[39m: Using extension docx@3.1.0
2022-01-14T17:14:59.917Z - [32minfo[39m: Using extension fs-store-aws-s3-persistence@3.0.1
2022-01-14T17:15:00.509Z - [32minfo[39m: Using extension html-to-xlsx@3.1.0
2022-01-14T17:15:00.820Z - [32minfo[39m: html-to-xlsx detected chrome as available html engine
2022-01-14T17:15:00.901Z - [32minfo[39m: Using extension pptx@3.1.0
2022-01-14T17:15:00.905Z - [32minfo[39m: Using extension scheduling@3.0.1
2022-01-14T17:15:01.114Z - [32minfo[39m: Using extension scripts@3.1.0
2022-01-14T17:15:01.116Z - [32minfo[39m: Using extension static-pdf@3.0.0
2022-01-14T17:15:01.117Z - [32minfo[39m: Using extension studio@3.2.0
2022-01-14T17:15:01.746Z - [32minfo[39m: Using extension xlsx@3.1.0
2022-01-14T17:15:01.909Z - [32minfo[39m: Using extension public-templates@3.0.0
2022-01-14T17:15:01.910Z - [34mdebug[39m: Extension public-templates@3.0.0 was disabled
2022-01-14T17:15:01.910Z - [32minfo[39m: Using extension sample-template@3.1.0
2022-01-14T17:15:01.913Z - [32minfo[39m: Using extension studio-theme-dark@3.0.1
2022-01-14T17:15:01.915Z - [32minfo[39m: Using general timeout for rendering (reportTimeout: 600000)
2022-01-14T17:15:01.915Z - [32minfo[39m: Using mongodb provider for template store.
2022-01-14T17:15:02.074Z - [34mdebug[39m: studio default theme is: light
"2022-01-14T17:15:02.612Z - [33mwarn[39m: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
at async profilesCleanup (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:180:5)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:244:7)
2022-01-14T17:15:02.614Z - [32minfo[39m: Creating default express app.
2022-01-14T17:15:02.648Z - [32minfo[39m: jsreport server successfully started on http port: 8084
2022-01-14T17:15:02.703Z - [32minfo[39m: Verifying license key free
2022-01-14T17:15:03.387Z - [32minfo[39m: Starting one month enterprise trial
2022-01-14T17:15:03.424Z - [34mdebug[39m: Creating samples is disabled
2022-01-14T17:15:03.427Z - [32minfo[39m: Initializing worker threads
"2022-01-14T17:15:03.429Z - [34mdebug[39m: Extensions in workers: base, child-templates, components, data, express, handlebars, jsrender, localization, npm, pdf-utils, reports, text, version-control, assets, browser-client, chrome-pdf, docx, html-to-xlsx, pptx, scripts, static-pdf, studio, xlsx"
2022-01-14T17:15:04.422Z - [32minfo[39m: 1 worker threads initialized in 995ms
2022-01-14T17:15:04.423Z - [32minfo[39m: Starting temp files cleanup with 600000ms threshold
2022-01-14T17:15:04.424Z - [32minfo[39m: reporter initialized
2022-01-14T17:15:19.830Z - [34mdebug[39m: OData query on folders
2022-01-14T17:15:19.895Z - [34mdebug[39m: OData query on assets
2022-01-14T17:15:20.365Z - [34mdebug[39m: OData query on templates
2022-01-14T17:15:20.592Z - [34mdebug[39m: OData query on templates
2022-01-14T17:15:20.787Z - [34mdebug[39m: OData query on scripts
2022-01-14T17:15:21.012Z - [34mdebug[39m: OData query on assets
"2022-01-14T17:16:02.406Z - [33mwarn[39m: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
"2022-01-14T17:17:02.232Z - [33mwarn[39m: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)message
"2022-01-14T17:28:02.190Z - [33mwarn[39m: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
2022-01-14T17:28:37.844Z - [34mdebug[39m: OData update on templatesBelow error is repeating if i try to run already working report why iam getting the below error?
message
"2022-01-14T17:33:02.168Z - [33mwarn[39m: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)- Also is it possible to install aws amplify to call graphql api of appsync from jsreport beacuse while calling GET method directly from rest api it will return all field.But using appsync we can query the required field from rest api?
- Also is there any problem to call GET method directly from rest api will it affect the rendering time/performance of report?Can you please show me any example to call appsync from jsreport using aws amplfy?
- Also why iam getting below error every time while rendering?
-
is regression issue is fixed in jsreport 3.3.0?
Yes, it's fixed there. You can find the release notes on github
https://github.com/jsreport/jsreport/releasesWhy jsreport throw timeOut issue if we run same report from multiple system at the same time.(numberOfWorker is 1).?
The
numberOfWorker
specifies the level of parallelism. You need to increase it to avoid other requests waiting.If i try to increase number of worker then what will be its maximum value.(Our application is multi-tenant application).
That is up to you. With a single processor and low memory, it doesn't make sense to use a high level of parallelism because it could overload the server.
Also can you please tell me why iam getting below error? Protocol error...
This error signals chrome process printing pdf badly crashed. It could have happened because the server was temporary overloaded.
Also is it possible to install aws amplify to call graphql api of appsync from jsreport beacuse while calling GET method directly from rest api it will return all field.But using appsync we can query the required field from rest API?
It should work, but I don't have experience there.