5 Replies Latest reply on Jan 13, 2010 12:23 AM by Richard Burton

    Java Heap Space on Jbossesb server

    Younes Yahyaoui Novice

      hi,

      has someone any idea about this kind of problem:

      14:30:59,469 ERROR [ExceptionUtil] Queue[null, name=quickstart_helloworld_Request_gw_DataImporter] startService
      java.lang.OutOfMemoryError: Java heap space
       at java.lang.Long.valueOf(Unknown Source)
       at org.jboss.messaging.core.impl.message.SimpleMessageStore.reference(SimpleMessageStore.java:68)
       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.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       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 sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy4.start(Unknown Source)


      how can i this error eliminate?

      regards

      younes

        • 1. Re: Java Heap Space on Jbossesb server
          Daniel Bevenius Master

          Hi,

           

          you can increase the memory by editing your servers bin/run.conf:

          if [ "x$JAVA_OPTS" = "x" ]; then
             JAVA_OPTS="-Xms128m -Xmx512m -XX:PermSize=200M -XX:MaxPermSize=200M -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
          fi
           
          

          Increase -Xmx to some value that makes you application run.

           

          I can see that the queue name in the stacktrace starts with quickstart, but I don't recognize which quickstart this is. Or is this a modified/extended custom version you have created perhaps?

           

          Regards,

           

          /Daniel

          I

          • 2. Re: Java Heap Space on Jbossesb server
            Tom Fennelly Master
            I'd be surprised at you getting this type of error from the ESB Server itself, because it's already configured with extra mem.  I think you might need to profile your code and see what it's doing.
            • 3. Re: Java Heap Space on Jbossesb server
              Richard Burton Newbie

              Hey Tom,

               

              The actual cause of this problem isn't the code that Younes Yahyaoui created nor is it a bug in JBoss ESB. The root cause is the monitoring system used in the ESB. By default it creates an in memory database that collects performance information about the ESB services. Over time, this table grows larger than the supplied memory size supplied by the JVM parameters (-Xmx etc.).

               

              For those reading this thread, the management system collects various bits of information about the services such as message counts by service, action, node and other processing information such as time, failed messages, bytes transferred and last successful and failed message date/times. This information later can be viewed through the web interface supplied with the JBoss ESB.

               

              For more information on this subject matter, please consult the following document for JBoss ESB 4.3 http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Administration_Guide/monitoring_and_management.html

               

              Later this month, I will also be writing up a blog entry on "How to build and deploy JBoss ESB services using Maven" which I'll also cover using M2Eclipse with JBoss ESB from within JBoss Developer Studio, having Maven automatically setup the JBoss ESB facets, etc.

               

              Regards,

               

              Richard L. Burton III

              Co-Founder of Http://www.SmartCodeLLC.com

              • 4. Re: Java Heap Space on Jbossesb server
                Ryan Hochstetler Newbie

                Richard,

                 

                Our dev instances are rarely up long enough, nor do they receive enough traffic to go OOM, and in production we use a real database to store the monitoring information, so I can't confirm your findings.  However, you might consider writing up a JIRA for the issue if you think you have something.  If you can reproduce the problem, take a class histogram of a JVM overflowing with hypersonic rows.  Be explicit and provide as much information as possible, or be prepared to go back and forth on the JIRA with one of the maintainers (NuhUh, IsToo, NuhUh, IsToo, etc.).

                • 5. Re: Java Heap Space on Jbossesb server
                  Richard Burton Newbie

                  Have you had any luck with your issue?

                   

                  When time permits, I'll open a JIRA ticket up like you mention. I wonder when JBoss ESB 5 is going to be released because there's a lot of things I hope are corrected with regards to the design. e.g., Not being able to associate a transformer to a provider.

                   

                  Best Regards,

                   

                  Richard L. Burton III

                  Co-Founder

                  http://www.SmartCodeLLC.com