I am developing in a linux environment, and the system is designed to work continuously for a long period of time. After a nightly test, we see a FileNotFoundException with the message "Too Many Files Open". We started to log the output of the lsof command at different times in the system to see if we can see what is happening. We noticed that many unnamed pipes are open. Therefore, I decided that this is due to the fact that file streams do not close. I searched the source for any Stream objects used and made sure that they all closed in the finally {} block. Are there any other types of Java objects that I could find so that I could not close, which would open all of these unnamed pipes?
Also, my ulimit is 1024, and I also looked for * Writer and made sure they all close too.
source
share