Report with many loops & data
-
Hi,
We create a sample report & run it with many data, it return a time out error, but with few record (1-5) it work fine.
Find the below temple, which i used as template
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<style>
{#asset casecard.css @encoding=utf8}
</style>
</head>
<body>
{{#each CaseFiles}}<div class="layout"> <div class="form-label"> <table width="100%"> <tr> <td width=70%> Ärendenummer : <b> {{Identificator}}</b></td> <td width=30%>Inkommet: <b>{{CaseDate}}</b></td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Klassificeringplan : <b style= "text-align:center"> {{ClassCode }}{{ClassCodeTitle}}</b></td> <td>Registerat :<b> {{CreatedDatetime}}</b></td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Ärendemening : <b class="data_align"> {{CaseTitle}}</b></td> <td>Ändrat: </td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Handläggare : <b class="data_align"> {{CaseResponsible}}</b></td> <td>Status: <b>{{CaseStatus}}</b></td> </tr> </table> </div>
<div class ="form-label">
<table width=100%>
<tr>
<td width=80%>Innehåll : <b class="data_align"> {{CaseDescription }}</b></td>
</tr>
<tr height=20px>
<td></td>
</tr>
<tr>
<td>Sekretess : <strong class="data_align" > {{Screeningcode}}{{ScreeningcodeName}}</strong> </td>
</tr>
<tr height=18px>
<td></td>
</tr>
</table>
</div><div class="form-label">
<b>Avsändare/Mottagare</b> <br><table width="100%">
{{#each CaseParties }}<tr>
<td width="60%"><label> Namn :</label> <b>{{Name}}</b></td>
{{#if Partytype }}
<td width="40%"><label>Personnr:</label> <b>{{ SocialSecurityNumber}}</b></td>
{{else}}<td width="40%"><label>Orgnr :</label> <b>{{Organnizationnumber}}</b> </td> {{/if}}
</tr>
<tr>
<td><label>Adress:</label> <b>{{MailingAddress}}</b></td>
<td> E-post: <b>{{EmailAddress}}</b></td></tr>
<tr>
<td><label>Postnr :</label> <b>{{PostalCode}}</b> Ort: <b>{{City}}</b></td>
<td><label>Mobil :</label> <b>{{Mobilnumber}}</b></td>
</tr>
<tr height=18px>
<td></td>
</tr>
{{/each}}
</table>
</div><div class="form-label"> <label>Nyckelord på ärendet: </label> {{#each Keywords}} <strong>{{Name}},</strong> {{/each}} </div> <div class="form-label"> Anteckningar: {{#each Notes}} <strong>{{description}},</strong> {{/each}} </div> <div class="form-label"> <b>Bevakning: </b> {{#each Reminders}} <table width="90%"> <thead> <tr align="left"> <th>Datum</th> <th>Användare</th> <th>Beskrivning</th> </tr> </thead> <tbody> <tr align="left"> <td>{{CreatedDatetime}}</td> <td></td> <td>{{Description}}</td> </tr> {{/each}} </tbody> </table> </div> <div class="form-label"> <b>Beslutinstans:</b> <table width="90%"> <thead> <tr align="left"> <th>Datum</th> <th>Instans</th> <th>Paragraf</th> <th>Beslut</th> </tr> </thead> <tbody> {{#each Decisions}} <tr align="left"> <td>{{DecisionDate}}</td> <td>{{DecisionInstance}}</td> <td>{{DecisionParagraph}}</td> <td>{{Description}}</td> </tr> {{/each}} </tbody> </table> </div> <div class="form-label"> <strong>Logg</strong> <table width=100%> <thead> <tr align="left"> <th>Datum </th> <th>Ändrat av</th> <th>Ändrat</th> </tr> </thead> <tbody> <tr align="left"> <td></td> <td></td> <td></td> </tr> </tbody> </table> </div>
<div style='page-break-after: always;'>
</div>{{#each Documents}}
<div class="form-label"> <table width="100%"> <tr> <td width=70%> Handlingsnummer: <b> {{Identificator}}</b></td> <td width=30%>Inkommet: <b>{{ReceiveDate }}</b></td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Handlingsrubrik : <b class="data_align"> {{Title}}</b></td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Handlingstyp: <b>{{DocumentTypeName}}</b></td> <td>Registrerat: <b>{{RecordDate}}</b></td> </tr> <tr height=15px> <td></td> </tr> <tr> <td>Innehåll: <b class="data_align">{{Description}}</b></td> <td>Status: <b>{{CaseStatus}}</b></td> </tr> </table> </div>
<div class="form-label">
<label for="sekretess">Sekretess:</label> <b style= "text-align:center">{{Screeningcode}} {{Name}}</b>
</div><div class="form-label">
<strong>Avsändare/Mottagare</strong><br><table width="100%">
{{#each CorrespondenceParties }}<tr>
<td width="60%"> Namn: <b>{{Name}}</b></td>
{{#if Partytype }}
<td width="40%"> Personnr: <b>{{ SocialSecurityNumber}}</b></td>
{{else}}<td width="40%"> Orgnr: <b>{{Organnizationnumber}}</b> </td> {{/if}}
</tr>
<tr>
<td> Adress: <b>{{MailingAddress}}</b></td>
<td> E-post: <b>{{EmailAddress}}</b></td></tr>
<tr>
<td> Postnr: <b>{{PostalCode}}</b> Ort: <b>{{City}}</b></td>
<td> Mobil: <b>{{Mobilnumber}}</b></td>
</tr>
<tr height=20px>
<td></td>
</tr>
{{/each}}
</table>
</div><div class="form-label">
<label>Anteckning: </label><b>{{Note}}</b>
</div><div class="form-label">
<b>Bevakning</b>
<table width=100%>
<thead>
<tr align="left">
<th>Datum </th>
<th>Användare/Roll</th>
<th>Beskriving</th>
</tr>
</thead>
<tbody>
<tr align="left">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table></div>
<div class="form-label">
<strong for="logg">Logg</strong><table width=100%> <thead> <tr align="left"> <th>Datum </th> <th>Ändrat av</th> <th>Ändrat</th> </tr> </thead> <tbody> <tr align="left"> <td></td> <td></td> <td></td> </tr> </tbody> </table>
</div>
<div style='page-break-after: always;'>
</div>{{/each}}
{{/each}}</div>
</body>
</html>
**
- Error Log**
Timeout Error: pdf generation not completed after 600000ms
Error: Timeout Error: pdf generation not completed after 600000ms at Timeout.setTimeout (/app/node_modules/jsreport-chrome-pdf/lib/conversion.js:122:19) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5)+0 Starting rendering request 112 (user: admin)
+28 Rendering template { name: /CaseCard/casecard, recipe: chrome-pdf, engine: handlebars, preview: false }
+67 Inline data specified.
+67 Resources not defined for this template.
+128 Replaced assets ["casecard.css"]
+134 Base url not specified, skipping its injection.
+134 Rendering engine handlebars
+164 Taking compiled template from engine cache
+215 Executing recipe chrome-pdf
+1601 Converting with chrome HeadlessChrome/72.0.3626.14 using dedicated-process strategy
+4389 Running chrome with params {"printBackground":true,"marginTop":"110px","marginBottom":"70px","marginRight":"30px","marginLeft":"30px","displayHeaderFooter":false,"margin":{"top":"110px","right":"30px","bottom":"70px","left":"30px"}}
-
It is timing out during chrome html->pdf conversion.
This is something we can't optimize.Try to increase the HW or remove some styles that can be slowing down the conversion.
How many pages do you expect to render?
Your 10min timeout setting should be enough for very big reports.
-
Page count depend on the No of Records, But i had try with 20 records, same time out error happen.
-
HI,
i have optimized the report html using "pdfCreatePagesGroup".Report generated properly (tested) with 45 records (report contain 100 pages pdf), but Generate report with more-than that records, again time out issue happened.
Error Log
Timeout error during executing script
Error: Timeout error during executing script at Timeout._onTimeout (/app/node_modules/script-manager/lib/manager-servers.js:152:23) at ontimeout (timers.js:498:11) at Timer.unrefdHandle (timers.js:611:5)+0 Starting rendering request 1091 (user: admin)
+2 Rendering template { name: test_casecard, recipe: chrome-pdf, engine: handlebars, preview: true }
+9 Inline data specified.
+9 Resources not defined for this template.
+12 Base url not specified, skipping its injection.
+12 Rendering engine handlebars
+612 Compiled template not found in the cache, compiling
+827 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+827 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+828 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+828 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+828 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+828 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+829 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+829 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+829 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+829 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+830 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+830 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+830 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+830 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+830 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+831 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+831 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+836 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+837 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+837 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+837 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+838 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+838 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+838 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+838 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+839 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+839 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+842 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+847 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+847 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+847 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+847 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+848 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+849 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+850 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+851 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+852 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+852 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+852 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+852 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+853 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+860 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+860 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+860 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+861 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+868 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+869 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+871 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+871 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+871 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+871 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+873 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+877 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+878 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+879 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+880 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+880 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+880 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+880 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+881 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+887 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+887 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+888 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+888 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+888 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+888 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+889 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+889 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+889 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+890 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+890 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+890 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+890 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+891 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+891 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+891 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+891 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+900 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+900 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+900 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+901 Pdf utils adding group hidden field group@@@IkEgVGVzdDEi@@@
+1311 Executing recipe chrome-pdf
+1996 Converting with chrome HeadlessChrome/72.0.3626.14 using dedicated-process strategy
+6757 Running chrome with params {"printBackground":true,"marginTop":"90px","marginBottom":"70px","marginRight":"30px","marginLeft":"30px","displayHeaderFooter":false,"mediaType":"print","headerTemplate":"","margin":{"top":"90px","right":"30px","bottom":"70px","left":"30px"}}
+19243 pdf-utils is starting pdf processing
+19615 Detected 1 pdf operation(s) to process
+26079 Running pdf operation merge