We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

com.aspose.words.Range.updateFields causes java.lang.OutOfMemoryError: GC overhead limit exceeded

While processing large files we obtain GC overhead limit exceeded with stack trace:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:45)
at java.lang.StringBuilder.(StringBuilder.java:80)
at com.aspose.words.apk.(RunWriter.java:323)
at com.aspose.words.fj.(DocumentRunSplitter.java:43)
at com.aspose.words.asa.a(SpanGenerator.java:226)
at com.aspose.words.fk.aK(DocumentSpanConverter.java:689)
at com.aspose.words.fk.EV(DocumentSpanConverter.java:629)
at com.aspose.words.fk.moveNext(DocumentSpanConverter.java:169)
at com.aspose.words.arw.a(SpanField.java:523)
at com.aspose.words.arw.a(SpanField.java:478)
at com.aspose.words.arw.u(SpanField.java:199)
at com.aspose.words.Field.IE(Field.java:532)
at com.aspose.words.Field.b(Field.java:460)
at com.aspose.words.Field.a(Field.java:390)
at com.aspose.words.ov.a(FieldUpdater.java:154)
at com.aspose.words.ov.l(FieldUpdater.java:107)
at com.aspose.words.os.execute(FieldUpdateExecutionItem.java:82)
at com.aspose.words.ov.hZ(FieldUpdater.java:97)
at com.aspose.words.ov.updateFields(FieldUpdater.java:57)
at com.aspose.words.Range.updateFields(Range.java:172)
File size caused this exeption was 26 Mb.
Options for JVM was:
-Xms256m -Xmx1536m -XX:PermSize=64m -XX:MaxPermSize=256m -Xss256k -XX:+DisableExplicitGC
Have you any suggestions on our problem?

Hi Evgeny,


Thanks for your inquiry. Most likely ‘OutOfMemoryError’ occurs when the system is running out of memory (less space in RAM is available for Aspose.Words process to continue). Could you please attach your input document here for testing? I will investigate the issue on my side and provide you more information.

Moreover, please note that during processing, the document needs to be held wholly in memory. Therefore, memory and CPU usage are dependent on document size and document complexity. it is better to use few small documents instead of one huge document.

Best Regards,