Too many open files: how many are open, what they are, and how many can the JVM open

后端 未结 5 1006
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 03:35

I\'m getting this exception in Java:

java.io.FileNotFoundException: (Too many open files) 

I\'m looking for the ways to eliminate this prob

5条回答
  •  北海茫月
    2020-12-01 03:57

    Since you are on Linux, I'd suggest, that you check the /proc-Filesystem. Inside proc, you will find a folder with the PID of your process containing a folder calld 'fd'. If your process id is 1234, the path is be

    /proc/1234/fd
    

    Inside that folder, you will find links to all opened files (do a 'ls -l'). Usually, you can tell by the filename which library / code might open and not close the file.

提交回复
热议问题