-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 G,
On 1/22/12 3:01 AM, gnath wrote: > We have been seeing "SocketException: Too many open files" in > production environment(Linux OS running Tomcat 6.0.35 with sun's > JDK 1.6.30) every day and requires a restart of Tomcat. When this > happened for the first time, we searched online and found people > suggesting to increase the file descriptors size and we increased > to 4096. But still the problem persists. We have the Orion App > Server also running on the same machine but usually during the day > when we check the open file descriptor by command: ls -l > /proc/PID/fd, its always less than 1000 combined for both Orion and > Tomcat. > > Here is the exception we see pouring in the logs once it starts: > This requires us to kill java process and restart tomcat. Our > Tomcat configuration maxThreadCount is 500 with minSpareThreads=50 > in server.xml How many connectors do you have? If you have more than one connector with 500 threads, then you can have more threads than maybe you are expecting. > SEVERE: 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:352) > at java.lang.Thread.run(Thread.java:662) > > ulimit -a gives for the user where Tomcat is running. > > open files (-n) 4096 How did you set the ulimit for this user? Did you do it in a login script or something, or just at the command-line at some point? How about (-u) max user processes or threads-per-process or anything like that? Sometimes the "Too many files open" is not entirely accurate. What does 'cat /proc/PID/limits' show you? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8cYZMACgkQ9CaO5/Lv0PC7+ACeMW3/jwhOUKB9RZ3u+dfN85jD NnMAoLU7QJ6DXKaI9Q/mPeEO6x9gXzx6 =Nd1d -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org