Java Tool Hung

Previously when we were using itext for conversions, we did not had any issues for a tool which converts documents and merges them as pdf.

But now, after changing to Aspose, the tool abruptly hungs at some point of execution(not conistent). Because of this, our business is effecting very much.

Can you please give me a solution for this. Let me know if you need more information.

We are using Aspose Total License.

Hi Gowtham,


We are sorry for the inconvenience. I am afraid it is quite difficult to suggest you any thing without replicating the issue at our end. Please share some sample code and error details here along with source documents, so we will try to replicate the issue exactly at our end and provide information accordingly.

However, you may check whether you have set enough Heap memory size to process big files as Aspose.Pdf processes the files in memory instead disk, so performance depends upon the file size/contents and system resources.

Furthermore, you can use MemoryCleaner object to clean the memory after completion of the process. After completing operations with Aspose.Pdf object you can close object with close() or dispose() methods and finally use com.aspose.pdf.MemoryCleaner.clear() method, It clears Aspose.Pdf specific instances and will enables you to effective memory usage.

Please note it is recommended that you should call this method only if there is a shortage of available memory. Please find sample code to check memory status.

Runtime rt = Runtime.getRuntime();
long max = rt.maxMemory()/1048576;
long total = rt.totalMemory()/1048576;
long free = rt.freeMemory()/1048576;
long used = total - free;

Best Regards,