Aspose Word Java leaving open descriptors on latest respective versions

Please have a look at aspose words as well. Saving a word doc as a pdf also shows the same behavior.

sample code should work in the project provided earlier.

    byte[] byteValue = java.util.Base64.getDecoder().decode(wordContent.getBytes());
    ByteArrayInputStream wordFile = new ByteArrayInputStream(byteValue);

    com.aspose.words.Document doc;
    doc = new com.aspose.words.Document(wordFile);
    // Save as PDF
    String filename = "resources/" + UUID.randomUUID().toString() + "_wordtopdf.pdf";
    doc.getLayoutOptions().getRevisionOptions().setShowInBalloons(1);, com.aspose.words.SaveFormat.PDF);

    com.aspose.pdf.Document pdfDoc = new com.aspose.pdf.Document(filename);
    // Create a new memory stream.
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    // Save the document to stream.;

    return output;

doc variable does not have close() as its a com.aspose.words.Document not a pdf. but, com.aspose.words.SaveFormat.PDF); cases the same FD issue.



We have tested the scenario using the latest version of Aspose.Words for Java 22.3 on Linux Ubuntu 21.10 and have not found this issue. In our case, the /proc/PID/fd folder is completely cleared after the completion of the algorithm. Also, this issue is not reproducible for Aspose.PDF on our side. Could you provide more details on the testing methodology, the Linux distribution used, and other specifics to consider?

Hi Alexey,

Have you tried running the code/project on a webserver jvm? We have our implementation running via a java webservice on IBM’s webserver. The server is running REDhat Linux not sure on OS version though.

For us the descriptor remains open until we restart the JVM hosting the EAR webservice.

Can you please try at your end on a JVM and verify? Meanwhile ill confirm the OS details with my teams and update here asap.



Thank you for your reply. We will investigate this scenario according to your recommendations using a web server and will share with you updated information about it in this forum thread.


We have logged this issue as WORDSJAVA-2713 in our tracking system. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Alexey, Do we have any update for this?


We are currently working on resolving this issue. You will be notified via this forum thread as soon as this issue is resolved.

We apologize for the inconvenience.

Any positive news @alexey.maslov?


This issue is not sorted out yet. We will provide details and update you on it soon.


Please expedite a fix for this as soon as possible. Its been nearly 3 months since the issue was reported and open descriptors really choke the system once they cross a certain threshold against the ulimit parameter.

We are eagerly waiting for a fix.

Waleed Khalid


We have set a high priority for this issue and will try to make the necessary corrections as soon as possible. Please accept our apologies for the inconvenience.