Hi jan,
using your sample template my K8s JSreport timeouts after 60 s as expected, both launching the render from Studio or API call. I also tested an another sample template that builds a big table and had the same result (and some OOM error).
Testing with our production template and data I got the 10 s timeout, both launching the render from Studio or API call.
As you suggested I tried same call to a local instance started with docker on my local machine with
docker run -e reportTimeout=60000 -p 5488:5488 -v $PWD/jsdata:/app/data jsreport/jsreport:2.10.0-full
and the error looks the same, timed out after 10s:
2020-10-16T18:16:47.201Z - info: Using general timeout for rendering (reportTimeout: 60000)
2020-10-16T18:16:47.201Z - info: Using fs provider for template store.
2020-10-16T18:16:47.207Z - info: fs store is persisting using fs
2020-10-16T18:16:47.208Z - info: fs store sync is disabled
2020-10-16T18:16:47.220Z - info: fs store is loading data
2020-10-16T18:16:47.293Z - info: fs store is initialized successfully
2020-10-16T18:16:47.312Z - info: Creating default express app.
2020-10-16T18:16:47.329Z - info: jsreport server successfully started on http port: 5488
2020-10-16T18:16:47.331Z - info: Verifying license key free
2020-10-16T18:16:47.617Z - info: Starting one month enterprise trial
2020-10-16T18:16:47.624Z - info: reporter initialized
2020-10-16T18:16:54.711Z - info: Starting rendering request 1 (user: null)
2020-10-16T18:16:54.714Z - info: Rendering template { name: co-gestione-prog, recipe: html-to-xlsx, engine: handlebars, preview: false }
2020-10-16T18:16:55.213Z - info: html-to-xlsx generation is starting
2020-10-16T18:17:05.754Z - warn: Rendering request 1 finished with error in 11043 ms
2020-10-16T18:17:05.755Z - warn: Error when processing render request 1 Error while executing html-to-xlsx recipe. Timeout Error: script evaluation not completed after 10000ms Error: Error while executing html-to-xlsx recipe. Timeout Error: script evaluation not completed after 10000ms
at module.exports (/app/node_modules/jsreport-core/lib/util/createError.js:11:13)
at Reporter.createError (/app/node_modules/jsreport-core/lib/reporter.js:332:12)
at Object.execute (/app/node_modules/jsreport-html-to-xlsx/lib/recipe.js:159:20)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (/app/node_modules/jsreport-core/lib/render/render.js:150:5)
caused by: Error: Timeout Error: script evaluation not completed after 10000ms
at Timeout._onTimeout (/app/node_modules/chrome-page-eval/lib/eval.js:19:19)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
2020-10-16T18:17:05.759Z - warn: Error during processing request at http://127.0.0.1:5488/api/report
This is our template:
<html>
<head>
<style>
{#asset co-style.css @encoding=utf8}
</style>
</head>
<body>
{{#each pages}}
<table name="{{GetSectionDescription section}}"">
<tr class="header">
<td>
Ticket
</td>
<td>
Stato
</td>
<td>
Cliente
</td>
<td>
Immobile
</td>
<td>
Immobile cliente
</td>
<td>
Resp. immobile
</td>
<td>
Regione
</td>
<td>
Provincia
</td>
<td>
Codice Raggrup.
</td>
<td>
Num. ODL Costi Extra
</td>
<td>
SERVIZIO
</td>
<td>
Descrizione
</td>
<td>
Numero Fornitori
</td>
<td>
Fornitore
</td>
<td>
Fornitore data inizio
</td>
<td>
Fornitore data fine
</td>
<td>
Data inizio Pianificata
</td>
<td>
Data fine Pianificata
</td>
<td>
Data Scadenza
</td>
<td>
Data inizio
</td>
<td>
Data Fine
</td>
<td>
Data inizio minimo
</td>
<td>
Data sospesione
</td>
<td>
Data ripr. lavori
</td>
<td>
Data ricev. rapp.
</td>
</tr>
{{#each items}}
<tr>
<td>{{wonum}}</td>
<td>{{state}}</td>
<td>{{siteId}}</td>
<td>{{eqnum}}</td>
<td>{{customerEqnum}}</td>
<td>{{personResponsible}}</td>
<td>{{country}}</td>
<td>{{province}}</td>
<td>{{groupNumber}}</td>
<td>{{extraordinaryTicket}}</td>
<td>{{service}}</td>
<td>{{description}}</td>
<td>{{supplierCount}}</td>
<td>{{supplierId}} - {{supplierName}}</td>
<td>{{supplierStartDate}}</td>
<td>{{supplierEndDate}}</td>
<td>{{plannedDateStart}}</td>
<td>{{plannedDateEnd}}</td>
<td>{{expirationDate}}</td>
<td>{{startDate}}</td>
<td>{{endDate}}</td>
<td>{{minDateStart}}</td>
<td>{{suspensionDate}}</td>
<td>{{presumedWorkDate}}</td>
<td>{{receptionReportDate}}</td>
</tr>
{{/each}}
</table>
{{/each}}
</body>
</html>
this is the helper function:
function GetSectionDescription (section) {
var descr = section;
switch(section) {
case 'DA_ASSEGNARE_DA_ASSEGNARE_MAKE':
descr = 'DA ASSEGNARE MAKE';
break;
case 'DA_ASSEGNARE_DA_ASSEGNARE_BUY':
descr = 'DA ASSEGNARE BUY';
break;
case 'DA_ASSEGNARE_IN_ASSEGNAZIONE_SU_SF':
descr = 'IN ASSEGNAZIONE SU SF';
break;
case 'IN_PROGRAM':
descr = 'IN PROGRAMMA';
break;
case 'DONE':
descr = 'SVOLTI';
break;
case 'ALL':
descr = 'TUTTI';
break;
}
return descr;
}
and this is the content of co-style.css
file:
.header {
font-weight: bold;
}
If you'd like to test it to try to reproduce the wired timeout, I'm going to send you the curl
sample code that make me getting the 10 s timeout.
Many thanks for your kind support.
Paolo