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

Free Support Forum - aspose.com

We are getting memory leak issue with Aspose Words

Hi Team,

Could you please check below error. The AWS server have stopped automatically due to out of memory. Its blocker and critical issue for us .

Apache Tomcat Error Logs :

SEVERE [Thread-4] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [documentprocessor] created a ThreadLocal with key of type [com.aspose.words.internal.zz12$1] (value [com.aspose.words.internal.zz12$1@11bfcae3]) and a value of type [com.aspose.words.internal.zz14] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

Project Details
Aspose Version : 21.5
Java Version : JDK 1.8
Tomcat Version : 9.0.37


@krishnass Could you please attach the document and code that will allow us to reproduce the problem? We will check the issue and provide you more information. It is required to reproduce the problem on our side to be able to investigate it.

Hi @alexey.noskov,

Thanks for the reply. Its Java code project we can’t share whole source code here. We are using Aspose words in my project version is 21.5. We will do POC of snippet code will share soon.

Please let us know better RAM size and processer for Aspose Memory management .


@krishnass Memory and processor consumption depends on size and complexity of document you are processing using Aspose.Words. So there is no strict recommendations.

HI @alexey.noskov

Sure We will do Load test then decide based up on the performance.

Please let us know - Aspose words required min and max memory for 150 users hitting simultaneously.

Note - We don’t know Aspose memory management logics - Please guide us.


@krishnass Unfortunately, it is difficult to answer this question. As I mentioned, memory consumption depend on the document size and complexity also it depend on operations you perform on your documents using Aspose.Words.
The bigger document is processed the more memory is required to read the document into Document Object Model. For example for DOC format Aspose.Words requires approximately 10 times more memory than the original document size. For DOCX format this formula will not work because DOCX format is more compact than DOC. Also memory consumption will grow if you render document to Fixed Page Format (PDF for example) because this operation requires building document layout, and this operation is both memory and processor consumptive.