All Things Techie With Huge, Unstructured, Intuitive Leaps

Thread: java.net.SocketException: Too many open files

Running my tomcat app on a Centos machine.  I looked at the logs and saw this error:

Thread: java.net.SocketException: Too many open files

Bummer.  I opened up a putty ssh to the server and did an su to superuser.  I wanted to see what the hard limit was for open file handles

I typed in at the bash#    ulimit -Hn and the return value was 1024,  Not good.

I issued the command to up the hard limit to 10000.  The command was ulimit -Hn 10000.

The soft limit was 1024 as well.  I upped the soft limit to 5000 with the command:  ulimit -Sn 5000

From what I could gather, this problem started happening when I initiated a log4j logger and we started getting decent traffic.

Hope this helps.

No comments:

Post a Comment