Hello,

I have an embedded activemq in my webapp and it is deployed in a jetty server. I believe that our server OS's file descriptor limit has enough value.

After a few days, the application crashed with the following error:

2011-01-05 00:34:40.000:WARN::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.eclipse.jetty.server.nio.SelectChannelConnector$1.acceptChannel(SelectChannelConnector.java:74) at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:650)
       at 
org.eclipse.jetty.io.nio.SelectorManager.doSelect(SelectorManager.java:195)
       at 
org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:134)
       at 
org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:850)
       at 
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
       at java.lang.Thread.run(Thread.java:6


Is there a possibility that I have configured my activemq or persistence wrongly which caused this? Here's my activemq.xml:
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:amq="http://activemq.apache.org/schema/core"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd";>

   <broker xmlns="http://activemq.apache.org/schema/core";
       brokerName="devbroker" persistent="true"
       destroyApplicationContextOnStop="true"
       dataDirectory="/tmp/dev">
<transportConnectors>
           <transportConnector name="openwire"
               uri="vm://devBroker" />
       </transportConnectors>

       <plugins>
           <statisticsBrokerPlugin />
       </plugins>

   </broker>

</beans>


I googled this and saw some posts telling this maybe caused by an improper setting on memory limit. I also saw some threads that says use kaha db for better persistence. How am I able to address both of this? Can I configure both using the activemq.xml alone? What are the appropriate values for an application that processes large amount of messages.

Can anyone point me to a good activemq.xml configuration that is good for production environment?


Thanks!
-don

Reply via email to