Hi,
we are using Aspose Java Components (aspose-cells-7.4.0.jar, aspose.pdf-3.3.jdk16.jar, aspose.slides-6.9.1.jar and Aspose.Words.jdk16.jar) in a Java based web-application, acting like a DAM system for Sky Italy customer.
In particular we have a “shell” process with 2 Gb of reserved memory which is in charge of the generation of preview images for the acquired documents.
For more than one year we had no particular problems, but now our users are performing massive upload operations of big Office archives and we are experiencing some severe out of memory issues, resulting in “Java heap space errors”.
By analyzing the process memory dump we found out that the 75% of the space is filled with:
89
instances of “com.sun.imageio.plugins.jpeg.JPEGImageReader”,
loaded by “” occupy 965.944.408
(75,47%) bytes.
In attachment you can find a screenshot of the process memory usage in our test environment on which we reproduced the problem (with 1,5 Gb of memory, Aspose trial libraries and a Sun JDK 1.7.0_45-b18 64 bit), the error Stacktrace and the code used for generating document previews.
We managed to reproduce the problem by uploading the following archive twice in a row, with a few minutes break between the first and the second upload:
- 882 xls and xlsx documents (from 13 Kb to 947 Kb);
- 213 doc and docx documents (from 26 Kb to 9,5 Mb);
- 43 ppt and pptx documents (from 98 Kb to 3 Mb);
- 17 pdf documents (from 510 Kb to 16,6 Mb);
We tried to optimize garbage collecting and to update to the latest Aspose libraries, without any significant improvement.
Any help would be very appreciated since the problem is becoming quite urgent.
Thanks,
Diego