1 Reply Latest reply on Apr 19, 2013 11:48 AM by zaouiahmed

    'Too many open files' exception in RedHat

    anishantony

      Hi

      When i do some operations in gatein portal, After some time i can't access some portlets in it and shows following exception

       

      2013-04-18 03:06:38,821 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:408)

          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:310)

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

      2013-04-18 03:06:38,821 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:408)

          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:310)

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

       

      OS Version : RHEL 6

       

      Thanks

      Anish Antony

        • 1. Re: 'Too many open files' exception in RedHat
          zaouiahmed

          It is caused by  the limited number of opened files on your linux
          You can try to set it to a higher value with the command:

           

          ulimit -n 4096 

          To change this value definitively the change must be done on the file /etc/security/limits.conf.

           

          You should restart the server and check if other exceptions persists.

           


          Best Regards,

          Zaoui Ahmed