0 Replies Latest reply on May 30, 2011 4:55 AM by topikpl

    Unexpected OutOfMemoryError

    topikpl

      Hi, I got OOM error with activemq-5.4.2-fuse-02-00. I'm aware of "Number of threads" section of http://activemq.apache.org/javalangoutofmemory.html but there are circa 10 Destinations, so I don't consider this to be a "large number". The rest of my configuration goes as following:

       

      there are several machines exchanging ~1 mln messages per day. Every client uses failover connection to the broker, there's only one broker. The system is required to be on-line only on some points of day, so the machines hibernate and wake-up twice a day (including the broker).

       

      The only thing changed in Tanuki wrapper configuration is wrapper.ping.timeout=0, so org.apache.activemq.UseDedicatedTaskRunner=true is in effect (as it's there by default).

       

      The error is not reproducible (so far) and showed up after ~6 months in this configuration.

       

      I would be grateful for any suggestions what could cause the error. The stack traces follow:

       

      Exception in thread "InactivityMonitor WriteCheck" java.lang.OutOfMemoryError: unable to create new native thread

           at java.lang.Thread.start0(Native Method)

           at java.lang.Thread.start(Unknown Source)

           at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)

           at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)

           at org.apache.activemq.transport.InactivityMonitor.writeCheck(InactivityMonitor.java:147)

           at org.apache.activemq.transport.InactivityMonitor$2.run(InactivityMonitor.java:113)

           at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)

           at java.util.TimerThread.mainLoop(Unknown Source)

           at java.util.TimerThread.run(Unknown Source)

      Exception in thread "ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:61616"  INFO | Transport failed: java.net.SocketException: Connection reset

      java.lang.OutOfMemoryError: unable to create new native thread

           at java.lang.Thread.start0(Native Method)

           at java.lang.Thread.start(Unknown Source)

           at org.apache.activemq.thread.TaskRunnerFactory.execute(TaskRunnerFactory.java:92)

           at org.apache.activemq.thread.TaskRunnerFactory.execute(TaskRunnerFactory.java:85)

           at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:213)

           at org.apache.activemq.transport.tcp.TcpTransportServer.handleSocket(TcpTransportServer.java:424)

           at org.apache.activemq.transport.tcp.TcpTransportServer$1.run(TcpTransportServer.java:354)

           at java.lang.Thread.run(Unknown Source)

      Exception in thread "ActiveMQ Task" java.lang.OutOfMemoryError: unable to create new native thread

           at java.lang.Thread.start0(Native Method)

           at java.lang.Thread.start(Unknown Source)

           at org.apache.activemq.thread.DedicatedTaskRunner.(DedicatedTaskRunner.java:42)

           at org.apache.activemq.thread.TaskRunnerFactory.createTaskRunner(TaskRunnerFactory.java:80)

           at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:891)

           at org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:217)

           at java.lang.Thread.run(Unknown Source)