I am using a third-party commercial library that seems to be skipping files (I tested this on Linux using lsof). In the end, the server (Tomcat) begins to receive the infamous "Too many open file errors" and I need to restart the JVM.
I have already contacted the seller. In the meantime, however, I would like to find a workaround for this. I do not have access to their source code. Is there a way in Java to clear file descriptors without having access to the source object File(or FileWriter, FileOutputStreametc.)?
source
share