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

Free Support Forum - aspose.com

Memory Leak - 99.83% using Aspose.Words for Java

It can be reproduced in production with customer’s real data. But we are still trying to reproduce the memory issue on local. I am not able to provide a testing code for you.

From the output of analyzing the OOM memory dump file, we found the number of objects of two Aspose classes is far bigger than the data we were rendering. (The data size is very small, 13 rows in total).

And we can see from the following screenshots, the 99.83% memory usage is by two classes(both are Aspose classes), they are com.aspose.words.Run and com.aspose.words.FieldSeparator.

Do you happen to know which improper usage would cause this problem? Btw, we are using Aspose 15 in Java.

image.png (322.0 KB)


Please note that performance and memory usage all depend on complexity and size of the documents you are generating.

During processing, the document needs to be held wholly in memory. Usually, Aspose.Words needs 10 times more memory than the original document size to build a DOM in the memory.

We suggest you please increase Java heap space size and use the latest version of Aspose.Words for Java 20.5. You can get the 30 days temporary license from here:
Get a Temporary License

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a simple Java application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.


If we buy a paid support or consulting service, can they help to solve the issue on the old version of Aspose Word in Java?

Btw, I don’t see the pricing for the consulting service, how can I know the pricing table?


Please check our paid support policies from following link.
Paid Support Policies

Please note that the paid consulting service is based on project. Please share your detail in the following link. Our team will contact you as soon as possible.

Thanks for the information.