Apache ActiveMQ – How to resolve java.io.IOException: Too many open files exception?
Join the DZone community and get the full member experience.
Join For Freei have worked on activemq for quite a while, and there’s one annoying exception that i see all the time – java.io.ioexception: too many open files – which we see time to time.
[localhost:61613] error transportconnector – could not accept connection : too many open files
[or@0.0.0.0:8161] warn log – exception
java.io.ioexception: too many open files
at sun.nio.ch.serversocketchannelimpl.accept0(native method)
at sun.nio.ch.serversocketchannelimpl.accept(serversocketchannelimpl.java:145)
at org.mortbay.jetty.nio.selectchannelconnector$1.acceptchannel(selectchannelconnector.java:75)
at org.mortbay.io.nio.selectormanager$selectset.doselect(selectormanager.java:475)
at org.mortbay.io.nio.selectormanager.doselect(selectormanager.java:166)
at org.mortbay.jetty.nio.selectchannelconnector.accept(selectchannelconnector.java:124)
at org.mortbay.jetty.abstractconnector$acceptor.run(abstractconnector.java:537)
at org.mortbay.thread.boundedthreadpool$poolthread.run(boundedthreadpool.java:450)
have spent some time gooling about this error and got a rough idea on what this error is all about, what we can do to identify the issue, and (possibly!) fix it
i’ll need some more time to write what i’m doing to solve it, and btw, you can find the links that were helpful to me:
1. activemq 5.1.0 runs out of file descriptors with lots of ‘close_wait’ sockets : https://issues.apache.org/jira/browse/amq-1739
2. activemq forum: http://activemq.2283324.n4.nabble.com/too-many-open-files-td2364996.html
Published at DZone with permission of Singaram Subramanian, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments