3 Replies Latest reply on Apr 3, 2009 6:41 PM by i gain

    java.net.SocketException: Too many open files

    i gain Newbie


      While load testing on Jboss 4.3 we are seeing one exception again and again.
      Initially when we saw this we increased our FD limit on Sun OS from 256 to 8000
      Even after setting max file descriptor 8000 in the Sun OS, it is giving same exception

      2009-04-03 00:49:38,777 ERROR [org.apache.tomcat.util.net.JIoEndpoint] Socket accept failed
      java.net.SocketException: Too many open files
       at java.net.PlainSocketImpl.socketAccept(Native Method)
       at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
       at java.net.ServerSocket.implAccept(ServerSocket.java:450)
       at java.net.ServerSocket.accept(ServerSocket.java:421)
       at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
       at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
       at java.lang.Thread.run(Thread.java:595)

      What could be the possible reason for it ??
      Do we need to set FD limit in JVM as well ?

      We are using JDK1.5