Showing posts with label Too many open files. Show all posts
Showing posts with label Too many open files. Show all posts

Sunday, March 6, 2011

How to resolve "Too many open files" problem

When running certain software in your Linux environment, you may have come across the following exception, which is a process blocker.

/wso2/carbonstudio/eclipse/esb/mediator/impl/EnrichMediatorImpl.class (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.ant4eclipse.lib.core.util.Utilities.writeFile(Utilities.java:1049)
... 95 more 


Sometimes these occur due to lack of some property setting in your machine.
If you too are fed up of tackling with those errors, follow the steps below for a fix.
  • Step 1
Go to /etc/security directory of your computer by the following command in your console
     cd /etc/security
  • Step 2
edit the limits.conf with following properties and save.
* soft      nofile   65535
* hard    nofile   65535Make sure that you do not comment on the above 2 lines. 
 
Problem Solved!! Now you can carry on your work.