You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Dominik Stadler <do...@gmx.at> on 2021/07/02 10:58:49 UTC

Re: POI XWPF memory issue

Hi,

The classes for Word/XWPF do not have such a mode, only Excel/XSSF via the
SXSSF classes support writing very large documents.

How large is the current memory of your Java process and can't you provide
a bit more via the -Xmx<n> setting of Java?

Dominik.

On Wed, Jun 30, 2021 at 11:03 PM Steve Longitude <no...@gmail.com>
wrote:

> I am trying to create large Word document using POI XWPF java API. At some
> point I am getting OutOfMemoryError: GC overhead limit exceeded.
> Is there some way to flush temporary result to IO, something similar to
> the SXSSFSheet flushRows()?
> Or is there some other way to write temporary result to IO and release
> memory?
>
> Thank you
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: POI XWPF memory issue

Posted by Steve Longitude <no...@gmail.com>.
Thank you very much for your answer.
Memory of java process is ~2 - 3 GB. I understand that increasing -Xmx is an option.
It looks like that is not possible to unload part of the Word document from memory to IO, release memory and continue writing the rest of the document. 

On 2021/07/02 10:58:49, Dominik Stadler <do...@gmx.at> wrote: 
> Hi,
> 
> The classes for Word/XWPF do not have such a mode, only Excel/XSSF via the
> SXSSF classes support writing very large documents.
> 
> How large is the current memory of your Java process and can't you provide
> a bit more via the -Xmx<n> setting of Java?
> 
> Dominik.
> 
> On Wed, Jun 30, 2021 at 11:03 PM Steve Longitude <no...@gmail.com>
> wrote:
> 
> > I am trying to create large Word document using POI XWPF java API. At some
> > point I am getting OutOfMemoryError: GC overhead limit exceeded.
> > Is there some way to flush temporary result to IO, something similar to
> > the SXSSFSheet flushRows()?
> > Or is there some other way to write temporary result to IO and release
> > memory?
> >
> > Thank you
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > For additional commands, e-mail: user-help@poi.apache.org
> >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org