1 Reply Latest reply on Aug 12, 2009 5:01 AM by Tyronne Wickramarathne

    too many message in queue causes java.lang.OutOfMemoryError

    bodrin b. Newbie

      Hi,

      The story is that we have a producer and no consumer on a queue and the message count become ~200000 and an OutOfMemoryError is thrown. The
      server (JBM.1.4.0.SP3 / jboss-4.2.2.GA) is not able to restart also!


      mysql> select count(*),channel_id from JBM_MSG_REF group by channel_id;
      +----------+------------+
      | count(*) | channel_id |
      +----------+------------+
      | 7 | 24 |
      | 11365 | 25 |
      | 2058 | 26 |
      | 12 | 28 |
      | 4445 | 29 |
      | 4424 | 30 |
      | 3056 | 39 |
      | 190072 | 601 |
      +----------+------------+
      8 rows in set (0.13 sec)


      Here is the log after restart:


      2009-08-12 10:03:19,823 ERROR [STDERR] Exception in thread "RMI TCP Connection(idle)"
      2009-08-12 10:03:19,823 ERROR [STDERR] java.lang.OutOfMemoryError: GC overhead limit exceeded
      2009-08-12 10:03:19,823 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:534)
      2009-08-12 10:03:19,823 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      2009-08-12 10:03:19,823 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      2009-08-12 10:03:19,823 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      2009-08-12 10:03:19,823 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      2009-08-12 10:03:19,823 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      2009-08-12 10:03:19,843 ERROR [org.jboss.messaging.util.ExceptionUtil] Queue[null, name=mgmt_billing_model_events] startService
      java.lang.OutOfMemoryError: Java heap space
      at org.jboss.messaging.core.impl.message.MessageSupport.createReference(MessageSupport.java:292)
      at org.jboss.messaging.core.impl.message.SimpleMessageStore.reference(SimpleMessageStore.java:77)
      at org.jboss.messaging.core.impl.PagingChannelSupport.processReferences(PagingChannelSupport.java:583)
      at org.jboss.messaging.core.impl.PagingChannelSupport.doLoad(PagingChannelSupport.java:498)
      at org.jboss.messaging.core.impl.PagingChannelSupport.load(PagingChannelSupport.java:211)
      at org.jboss.jms.server.destination.QueueService.startService(QueueService.java:89)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
      at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      2009-08-12 10:03:19,864 WARN [org.jboss.system.ServiceController] Problem starting service jboss.messaging.destination:service=Queue,name=mgmt_billing_model_events
      java.lang.OutOfMemoryError: Java heap space
      at org.jboss.messaging.core.impl.message.MessageSupport.createReference(MessageSupport.java:292)
      at org.jboss.messaging.core.impl.message.SimpleMessageStore.reference(SimpleMessageStore.java:77)
      at org.jboss.messaging.core.impl.PagingChannelSupport.processReferences(PagingChannelSupport.java:583)
      at org.jboss.messaging.core.impl.PagingChannelSupport.doLoad(PagingChannelSupport.java:498)
      at org.jboss.messaging.core.impl.PagingChannelSupport.load(PagingChannelSupport.java:211)
      at org.jboss.jms.server.destination.QueueService.startService(QueueService.java:89)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
      at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      2009-08-12 10:03:19,865 DEBUG [org.jboss.system.ServiceController] starting service jboss.messaging.destination:service=Topic,name=RFIDs