8 Replies Latest reply on May 24, 2013 2:46 AM by amistry007

    Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS

    uvijayreddy657 Newbie

      2012-02-07 13:53:48,754 ERROR [org.apache.tomcat.util.net.JIoEndpoint] (http-0.0.0.0-8080-Acceptor-0) Socket accept failed

      java.net.SocketException: Too many open files

              at java.net.PlainSocketImpl.socketAccept(Native Method)

              at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)

              at java.net.ServerSocket.implAccept(ServerSocket.java:462)

              at java.net.ServerSocket.accept(ServerSocket.java:430)

              at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)

              at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:314)

              at java.lang.Thread.run(Thread.java:662)

        • 1. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
          Márton Steierlein Newbie

          I also encounter the same problem. The jbpm.console.properties file is opened several(hundred - in my case) times. I'm using the rest interface /new_instance for creating processes.

           

          Here is the output of lsof in linux on my test machine:

           

          java      20815      root  966r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  967r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  968r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  969r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  970r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  971r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  972r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  973r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  974r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  975r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  976r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  977r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  978r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  979r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  980r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  981r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  982r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  983r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  984r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  985r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  986r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  987r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  988r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  989r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  990r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  991r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  992r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  993r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  994r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  995r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  996r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  997r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  998r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root  999r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1000r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1001r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1002r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1003r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1004r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1005r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1006r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes/jbpm.console.properties

          java      20815      root 1007r      REG               8,17      363    2425414 /opt/jbpm/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp93689ccb9642ad01/jbpm-gwt-console-server.war-708c889cebe9e63b/WEB-INF/classes

          • 4. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
            Seyed Mohammad Hosein Jamali Newbie

            I set echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout and restart networking service and then increase The Maximum Number Of Open Files / File Descriptors (FD) to 1000000 but the problem is not resolved.

            If I decrease tcp_fin_timeout to 10 secondes Too many open files happens more than the time tcp_fin_timeout is equal to 30 or 60 seconds .

             

            any help appreciated.

            S.M.H.Jamali

            • 5. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
              Mauricio Salatino Master

              Yes it should be fixed in 5.3, if you still have troubles please create a jira issue for 5.3

              Cheers

              • 6. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
                amistry007 Newbie

                Hi Mauricio, what was the actual fix that was done to the codebase (class/method) to resolve this issue. We are uisng JBPM 5.2 and at present moment have no capacity to upgrade to 5.3, so would like to see if we can patch our 5.2 release with this fix. Thanks, Ash.

                • 7. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
                  Jonathan Albornoz Newbie

                  I have jbpm 5.3 on linux and this solve with ulimit -n 10000 on my linux server.

                  Cheers!

                  • 8. Re: Getting ***java.net.SocketException: Too many open files*** when running JBPM 5.2 in linux OS
                    amistry007 Newbie

                    Jonathan, this would just delay the issue. As over time I can see these handles increasing until our application is restarted.

                     

                    Mauricio, what was the actual fix that was done to the codebase?