Hello,
we have an issue with generating reports from HTML to XLSX. It works fine for 10-100 entries, but with 1000 entries, it crashes with an error.
Resources:
limits:
cpu: 1200m
memory: 4Gi
requests:
cpu: 1200m
memory: 4Gi
JSReport Build: 4.6.0-full
Config file:
{
"httpPort": 5488,
"store": {
"provider": "postgres"
},
"logger": {
"console": {
"transport": "console",
"level": "{{ .Values.deployment.jsreport.logger.console | default "debug" }}"
},
"file": {
"transport": "file",
"level": "{{ .Values.deployment.jsreport.logger.file | default "debug" }}",
"filename": "logs/log.txt",
"silent": true
},
"error": {
"transport": "console",
"level": "error",
"filename": "logs/error.txt",
"silent": true
}
},
"trustUserCode": true,
"reportTimeout": {{ .Values.deployment.jsreport.reportTimeout }},
"workers": {
"numberOfWorkers": {{ .Values.deployment.jsreport.workers.numberOfWorkers }}
},
"templatingEngines": {
"timeout": 1200000
},
"chrome": {
"timeout": 1200000,
"launchOptions": {
"args": ["--no-sandbox"]
}
},
"extensions": {
"scripts": {
"timeout": 1200000
},
"postgres-store": {
"host": "{{ .Values.deployment.jsreport.extensions.postgresStore.host }}",
"port": {{ .Values.deployment.jsreport.extensions.postgresStore.port }},
"database": "{{ .Values.deployment.jsreport.extensions.postgresStore.database }}",
"user": "{{ .Values.deployment.jsreport.extensions.postgresStore.username }}",
"password": "{{ .Values.deployment.jsreport.extensions.postgresStore.password }}",
"ssl": {
"rejectUnauthorized": false,
"ca": "/app/global-bundle.pem"
}
}
}
}
Template:
<table>
<tr>
{{#each Data.[0]}}
<th>{{@key}}</th>
{{/each}}
</tr>
{{#each Data}}
<tr>
{{#each this}}
<td>{{this}}</td>
{{/each}}
</tr>
{{/each}}
</table>
Error:
{"id":"to26sk0t0g2h0jl","level":"warn","message":"Error when processing render request 3\n(because) error while executing html-to-xlsx recipe\n(because) page crashed!\nError: Page crashed!\n at #onTargetCrashed (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:372:50)\n at /app/node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:62:7\n at Array.map (<anonymous>)\n at Object.emit (/app/node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:61:20)\n at CdpCDPSession.emit (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:83:23)\n at CdpCDPSession._onMessage (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:82:18)\n at Connection.onMessage (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:142:25)\n at WebSocket.<anonymous> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:44:32)\n at callListener (/app/node_modules/ws/lib/event-target.js:290:14)\n at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:209:9)\n at WebSocket.emit (node:events:517:28)\n at Receiver.receiverOnMessage (/app/node_modules/ws/lib/websocket.js:1220:20)\n at Receiver.emit (node:events:517:28)\n at Immediate.<anonymous> (/app/node_modules/ws/lib/receiver.js:601:16)\n at process.processImmediate (node:internal/timers:476:21)\nwrapped by:\nError: Error while executing html-to-xlsx recipe\n(because) page crashed!\n at module.exports (/app/node_modules/@jsreport/jsreport-core/lib/shared/createError.js:10:13)\n at WorkerReporter.createError (/app/node_modules/@jsreport/jsreport-core/lib/shared/reporter.js:53:12)\n at module.exports (/app/node_modules/@jsreport/jsreport-html-to-xlsx/lib/recipe.js:162:20)\n at async invokeRender (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:93:5)\n at async WorkerReporter._render (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:148:7)\n at async /app/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:232:24\n at async processAndResponse (/app/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:41:17)","rootId":"to26sk0t0g2h0jl","timestamp":1729161670264}
{"id":"to26sk0t0g2h0jl","level":"warn","message":"Rendering request 3 finished with error in 31450 ms","rootId":"to26sk0t0g2h0jl","timestamp":1729161670265}
{"level":"warn","message":"Error during processing request at http://jsreport.dev.svc.cluster.local:5488/api/report","timestamp":1729161670269}
Additionally, we tried this:
Link