Timeout when exporting large dataset as XLSX using p:dataExporter

Viewed 185

I am able to export 68000 records. When I try to export records more than 80000+ records, it takes more than 2 mins and I will get server timed out error.

<h:commandLink id="excelLinkId">
    <p:dataExporter type="xlsx" target="dataTableId" fileName="file"/>
</h:commandLink>

I'm using PrimeFaces 8.0.

1 Answers

Don't use type="xlsx" that stores it all in memory! Use type="xlsxstream" which writes one row at a time and then garbage collects it. I have written out 8000 line PrimeFaces Datatable's no problem with xlsxstream.

Related