We have tried a simple java program, which read a pdf file, then run a for loop (x 10000 times) to convert PDF to DOCX by calling com.aspose.pdf.Document.save(), using DocSaveOptions.RecognitionMode.Flow
We monitored the running java program (source code and the pdf file is attached as aspose-memory-test.zip) using JDK’s tool “jconsole”, and observed that the used memory (heap size) is keep growing, from less than 1GB to over 4GB, and got “java.lang.OutOfMemoryError: GC overhead limit exceeded” after running 2696 times
Environment information:
- JDK / JRE version: 1.8.0_231
- Aspose.Pdf version: 20.11 (jdk17)
- Operating System:
- Microsoft Windows Server 2019 Standard
- Microsoft Windows 10 Pro
aspose-memory-test.zip (219.2 KB)
jconsole-heap.png (282.9 KB)