1 Reply Latest reply on Mar 14, 2008 3:06 AM by jaikiran pai

    Getting "Too many open files" error with JBoss 4.2.2GA

    Doal Miller Newbie

      I am running into a problem with JBoss 4.2.2GA, front-ended with Apache 2.2.6 were JBoss or the webserver seems to be hanging on to connections and leaving them in the CLOSE_WAIT state. Then my application gets "Too many open files".

      There was a post about this in the EJB/JBoss forum but there wasn't a resolution. I thought I'd post my issue here to see if anyone has run into this. I can reproduce this with a straight-forward hit to JBoss/tomcat. If I go directly to JBoss on port 8080 I don't see the problem but going through Apache (KeepAlive is turned off) I do see this problem. The test uses a single thread and just sends many requests over and over. We can watch the number of open sockets climb until it gets close to the max 1024 and starts spewing "Too many open files".

      The open sockets are to port 8009 which is the port that JBoss listens to the Apache AJP connector.

      We are running on Linux FC6

      I've seen various issues listing this same error but I haven't seen any solutions. Our max file handles per user is 1024 which would see sufficient and the total max is over 200,000.

      I did try this on the same machine with the same version of Apache and FC6 but using JBoss 4.0.4GA and JBoss 4.0.3SP1 and neither had the problem. It appears to be the version of JBoss or some difference in the configuration. I have tried to make the configuration the same.

      Is anyone else running into this? Anyone figure a way out of this? Just bumping up the number of max connections will just put the problem off till later. Any insight or help will be appreciated. Thanks

      The exceptions look like this:
      10:34:50,698 ERROR [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:309)
      at java.lang.Thread.run(Thread.java:595)
      10:34:50,698 ERROR [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:309)
      at java.lang.Thread.run(Thread.java:595)

        • 1. Re: Getting
          jaikiran pai Master

           

          "eightmd" wrote:
          I am running into a problem with JBoss 4.2.2GA, front-ended with Apache 2.2.6 were JBoss or the webserver seems to be hanging on to connections and leaving them in the CLOSE_WAIT state. Then my application gets "Too many open files".



          I personally, have not worked with Apache front-ending JBoss. But based on what i have seen in one other forum thread in the Tomcat forum here, i could find this http://jira.jboss.com/jira/browse/JBPAPP-366. I dont know if its related to what you are seeing, but based on the description that you have provided here, i thought you might want to have a look at it.