April 30, 2007

"Too many open files" but what are they?

java.io.FileNotFoundException: /opt/tb55/s3/conf/web.xml (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106)
this shows the open file limit has been reached.. you can check this by JMX
java.lang:type=OperatingSystem >  OpenFileDescriptorCount


but what are these files ? you can see this by linux shell script

lsof -u tomcat

solution: increase systems open file limit !!!

vi /etc/security/limits.conf

and edit the line to increase open file limit

* soft nofile 3072
* hard nofile 4048

2 comments:

Anonymous said...

NB: The OpenFileDescriptorCount is not available in Windows, and it is not included in the OperatingSystemMXBean interface.

Mert Can Akkan said...

thanks for notice,

I didn't used coding and interface for this , I see this from monitoring tools like jmanage and jconsole