Aspose generates large amount of temp files

Something inside Aspose generates +~JF*****.tmp files to Linux temp folder.

Also all those files where generated until device running out of memory.

All of them has similar size and were generated in 1 second
We are using all Aspose.Total components to generate previews. I saw few threads with similar problems at separated Aspose products, but we have no idea about concret Aspose component producing trash.
Could you provide me with list of components those could have this problem? Or maybe we could disable them?

Hi,


Thanks for contacting support.

Please share some details regarding the operation/functionality your performing with our API’s because unless we have the details regarding function being performed and the API which you are using, we may not be able to identify the component causing this issue. We are sorry for this inconvenience.

The problem is at my production, it using Words, Cell, Slides, Email, Imaging, Tasks, Note, Cad and Diagram components. I can not detect which one cause the problem, since I can not reproduce this at test environment. I hope you could tell me where JasperReports used in Aspose and how I could disable it

@kvidmco,

Thanks for sharing the details.

Recently there has been some scenarios where some customers faced similar problem and during our investigation, we observed that temp files were created by AWT in the method: java.awt.Font#createFont(int, java.io.InputStream). However starting Aspose.Pdf for Java 11.2.0, we added clearing for aspose.pdf temp files in com.aspose.pdf.MemoryCleaner class.

Please note that once you have completed required operations using Aspose.Pdf object, you can close object with close() or dispose() methods and finally use com.aspose.pdf.MemoryCleaner.clearAllTempFiles() method, It clears Aspose related temporary files.

Sounds like a plan. But the are two problems.

  1. I do not use Aspose.Pdf . Is those cleanup methods exists for other components? If not, how can I check what components has those methods? Should I create topic for every component or this could be solved from this topic?

  2. In combination with runtime jvm error Java Runtime error - #4 by Adnan.Ahmad it makes those methods useless. Java could crash and files will newer cleanup.

@kvidmco,

Thanks for sharing the details.

I have further discussed the scenario with different teams and as per our knowledge, Aspose.Email and Aspose.Cells do not generate any temp files when dealing with supported file formats. However when using Aspose.Slides, it may use temp files, if you opt to use blob and explicitly set IsTemporaryFilesAllowed property. For further details, please visit Export blob from presentation, Blob management options. However, the temp files created during this process shall be removed when Presentation object is disposed.

May be you can try executing the code for specific API and see if you manage to identify the API causing this problem.

@kvidmco,

Adding more to my previous comments, Aspose.Words do not create temporary files and uses the memory. But in case it is required, customer can use TempFolder property of DocSaveOptions object to define temporary folder path.

Aspose.Words Java uses JVM specified temporary folder for processing but removes the files itself. Please try using the latest release of Aspose.Words for Java as older versions were not removing them automatically. For more information, please visit Folder used for Temporary file.