Org.apache.tomcat.jni.error 24 Too Many Open Files
Contents |
here for a quick overview of the tomcat too many open files site Help Center Detailed answers to any questions you might have
Tomcat Ulimit
Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business
Org.apache.tomcat.util.net.nioendpoint Acceptor.run Socket Accept Failed
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just socket accept failed java.io.ioexception: too many open files like you, helping each other. Join them; it only takes a minute: Sign up Error in tomcat “too many open files” up vote 7 down vote favorite 3 I have an application running on tomcat and sometimes I have the error below: SEVERE: Socket accept failed java.net.SocketException: Too many open files at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398) at java.net.ServerSocket.implAccept(ServerSocket.java:522) at java.net.ServerSocket.accept(ServerSocket.java:490) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:216) at java.lang.Thread.run(Thread.java:722) .... SEVERE: Error processed default web.xml named conf/web.xml at /local/myApp/apache-tomcat/conf/web.xml java.io.FileNotFoundException: /local/myApp/apache-tomcat/conf/web.xml (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.
here for a quick overview of the site Help Center Detailed
Socket Accept Failed Java.net.socketexception: Too Many Open Files
answers to any questions you might have Meta Discuss tomcat file descriptors the workings and policies of this site About Us Learn more about Stack Overflow the too many open files java company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss http://stackoverflow.com/questions/19636676/error-in-tomcat-too-many-open-files Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why does the the Java VM not recover after “Too many open files” errors? up vote 5 down vote favorite http://stackoverflow.com/questions/2485424/why-does-the-the-java-vm-not-recover-after-too-many-open-files-errors 1 In certain well-understood circumstances, our application will open too many sockets (database connections) and reach the maximum open files that the OS allows. We understand this; we are fixing the issue and also bumping up the limit. What we can't explain is why parts of our application don't recover even after the number of connections abates and we're well within the limit. In this case, it's an application running under Tomcat. When this happens, we first start seeing "Too many open files" errors: 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:390) at java.net.ServerSocket.implAccept(ServerSocket.java:453) 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:619) Eventually, we start seeing NoClassDefFoundErrors inside an application thread that's trying to open HTTP connections: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/protocol/ControllerThreadSocketFactory at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:128) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1349) [...] Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 8 more
not work correctly without it enabled. Please turn JavaScript back on and reload this page. All Places > JBoss AS > Performance Tuning > Discussions Please enter a https://developer.jboss.org/thread/70686 title. You can not post a blank message. Please http://blog.darthgibus.net/?p=89 type your message and try again. 12 Replies Latest reply on Sep 15, 2010 1:08 PM by Leonid Batizhevsky java.net.SocketException: Too many open files on Red Hat lin Kiran Krishnamurthy Jun 27, 2009 2:38 PM Dear All,We too many are using JBoss 4.2.2GA on a RHEL with Apache as Webserver.We keep running out of open files whenever after just hrs since the JBoss server is started.We also increased the ulimit max open files number ffrom 1024 to 8192 but still we seem to be maxing too many open out this number after a few hrs or when doing load testing. The application that is running on the JBoss server makes HTTP connections to other systems using Apache HTTPClient and the code is releasing the connections using the HTTPClient.can somebody pls help with this issue.JBoss 4.2.2 GA, RHELinux -- Quad Code 8GBRAM,There has been some internal JBoss errors which started occurring at a rapid pace and the server.log went up from 900kb to 350mb in a span of 30-60mins. The following are the errors in the server.log. this error is the only one that is logged in this whole 350mb server.log. there has been no other exception/error logged2009-06-22 16:20:39,512 ERROR [org.apache.tomcat.util.net.JIoEndpoint] Socket accept failedjava.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:453) 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:619)2009-06-22 16:20:39,512 ERROR [org.apache.tom
2: Turned out to be an alfresco bug. See http://issues.alfresco.com/jira/browse/ALF-4461. Each morning, my tomcat server is out, returning 500 errors because of this: [sourcecode language='bash'] SEVERE: Socket accept failed org.apache.tomcat.jni.Error: Too many open files at org.apache.tomcat.jni.Socket.accept(Native Method) at org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.java:1156) at java.lang.Thread.run(Thread.java:619) [/sourcecode] So, I initially had a ulimit -n of 1024. No problem, changed my shell and limits.conf to have 4096 and restarted the process. The next day, same error. So increased it to 32768. Same results. So I ran a couple cron job to see what was happening during the night: [sourcecode language='plain'] # Monitor openfiles * * * * * /usr/sbin/lsof -n -u root|egrep ‘java|alfresco|tomc' | wc -l >> /tmp/lsof_mon.out * * * * * cat /proc/sys/fs/file-nr >> /tmp/file-nr.out [/sourcecode] Apparently, the results are OK, despite the continuing errors. The "lsof" cron job never get any higer than 1320, and the monitor on file-nr didn't get above "2550 0 767274". Yes, I made sure the process was launched with the new parameter. Even after restarting the system, ulimit -n returns the correct amount of file descriptors. Even running "lsof" by itself doesn't return more than 3000 lines. For info, server is running CentOS 2.6.18-194.3.1.el5 #1 SMP x86_64. libtcnative is at version 1.20. Process running as root. Any idea anyone? Thanks. Related Share Author fredPosted on September 2, 2010Categories AlfrescoTags Alfresco, tomcat, too many open files 8 thoughts on “Tomcat: Too many open files… but why?” benji says: September 2, 2010 at 07:47 Threads and open sockets also count towards the file limit. Also one of the memory limits can cause the same error, been a while since I hit this though. Reply Lunatic says: September 2, 2010 at 08:08 Had the same problem with Oracle Forms Server: "too many open files" after one month. never found the solution except rebooting every week… Reply mgi says: September 2, 2010 at 08:46 I had the same problem within eclipse. It turned out to be a problem of the openjdk java version. Once I replaced it with the Java6 Runtime from Sun, the open files issu