Temporary files not being removed from /TEMP directories

We are finding a large number of jffi*.tmp, Aspose_.tmp or +~JF.tmp files left in the /TEMP directory (on Linux or Windows).


We use Aspose-Words (15.8) for Java and Aspose-PDF for Java (10.6.2 and 11.3)

Could you advise how this can be avoided or cleaned up by a threaded application and explain why they are not removed?

Thanks
Janet



Hi Janet,

Thanks for your inquiry. We had found that temp files are created by AWT in the method: java.awt.Font#createFont(int, java.io.InputStream). In the version 11.2.0 we added clearing for aspose.pdf temp files in com.aspose.pdf.MemoryCleaner class.

After completing operations with 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.

Please feel free to contact us for any further assistance.

Best Regards,

Tilal,


We are experiencing a large quantity of temporary files caused by PDF to HTML conversions which if not cleared completely cause critical disk space issues on the servers. I tested the MemoryCleaner.clearAllTempFiles() method on a local machine using our load tester which is multi-threaded. I found that disk access was 5MB/sec; on one occasion the thread never finished and many of the threads ran out of memory.
I’m not convinced that this is thread-safe nor that performance will not be negatively impacted (PDF to HTML already puts double or treble the load on CPU and resources than any other conversion). Operations are having to remove the Apose temporary files on a regular basis - this is less than ideal.

Will you be fixing this in a future release? Our current version of Aspose-PDF is 11.3.0.

Thanks
JanetF

Hi Janet,


Thanks for your feedback. We will appreciate it if you please share your sample code for PDF to HTML conversion and sample temporary files as well. Please also share your environment details, we will further look into the issue and will provide you information accordingly.

We are sorry for the inconvenience.

Best Regards,

Tilal,


I did include the sample code for PDF to HTML conversion in another private thread (see Aspose PDF for Java conversion from PDF to HTML taking up 78% of CPUtime).

I’m attaching a zip with the sample temporary files generated by the pdf (also included).

The environments that we run in are:

Windows 7 Enterprise (Local Machine)
Linux Servers (Red Hat Enterprise)

The Aspose-PDF version used is 11.3.

Thanks,

JanetF

Hi Janet,


Thanks for sharing additional information. We are looking into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,