2 Replies Latest reply on Jan 23, 2014 4:37 AM by Andreas Falk

    Heap Space Error while obtaining messages from esb message Database

    Andreas Falk Newbie

      We use the esb message system to handle message from 1MB - 5MB. If the system is under heavy traffic, the esb database stores ~400 Messages and if the esb tries to process all the messages we receive an heap space error. Is there a way to configure how many messages should be obtained in one step? We are using jBoss ESB Server 4.11.

       

      Thanks for your help and last but not least the logmessages

       

      2014-01-16 00:47:06,850 WARN  [org.jboss.resource.connectionmanager.TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@ad35d[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@dac6cb handles=1 lastUse=1389829370464 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1ca8f64 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18bf655 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@13139dd txSync=null]

      javax.resource.spi.ResourceAdapterInternalException: Unexpected error

          at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.broadcastConnectionError(BaseWrapperManagedConnection.java:393)

          at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.connectionError(BaseWrapperManagedConnection.java:370)

          at org.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:865)

          at org.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:852)

          at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:347)

          at org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl.getAllMessages(DBMessageStoreImpl.java:321)

          at org.jboss.soa.esb.actions.MessageRedeliverer.process(MessageRedeliverer.java:72)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:657)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:611)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:441)

          at org.jboss.soa.esb.listeners.ScheduleListener.onSchedule(ScheduleListener.java:117)

          at org.jboss.soa.esb.listeners.lifecycle.AbstractScheduledManagedLifecycle$1.onSchedule(AbstractScheduledManagedLifecycle.java:68)

          at org.jboss.soa.esb.schedule.SchedulerJob$ESBScheduledJob.execute(SchedulerJob.java:289)

          at org.quartz.core.JobRunShell.run(JobRunShell.java:203)

          at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

      Caused by: java.lang.OutOfMemoryError: Java heap space

      2014-01-16 00:47:06,850 ERROR [org.jboss.soa.esb.actions.MessageRedeliverer] Could not obtain messages.

      org.jboss.soa.esb.services.persistence.MessageStoreException: org.jboss.util.NestedSQLException: Error; - nested throwable: (java.lang.OutOfMemoryError: Java heap space)

          at org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl.getAllMessages(DBMessageStoreImpl.java:354)

          at org.jboss.soa.esb.actions.MessageRedeliverer.process(MessageRedeliverer.java:72)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:657)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:611)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:441)

          at org.jboss.soa.esb.listeners.ScheduleListener.onSchedule(ScheduleListener.java:117)

          at org.jboss.soa.esb.listeners.lifecycle.AbstractScheduledManagedLifecycle$1.onSchedule(AbstractScheduledManagedLifecycle.java:68)

          at org.jboss.soa.esb.schedule.SchedulerJob$ESBScheduledJob.execute(SchedulerJob.java:289)

          at org.quartz.core.JobRunShell.run(JobRunShell.java:203)

          at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

      Caused by: org.jboss.util.NestedSQLException: Error; - nested throwable: (java.lang.OutOfMemoryError: Java heap space)

          at org.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:873)

          at org.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:852)

          at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:347)

          at org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl.getAllMessages(DBMessageStoreImpl.java:321)

          ... 9 more

      Caused by: java.lang.OutOfMemoryError: Java heap space

        • 1. Re: Heap Space Error while obtaining messages from esb message Database
          Tom Cunningham Master

          First, please do not use the JBoss ESB Server for anything that demands production-level performance.   Use jboss-as-5.1.0.GA and install your ESB version (4.11) on top of it - the getting started guide goes into all of the details how to install.     The ESB server is a development-only resource that was created to help people get up and running quickly using the quickstarts and starting a project.     I can't stress this advice enough to get off the ESBServer and use the application server.

           

          Second, what kind of DB are you backing the message store with (see the dbstore section of jbossesb-properties.xml)?    Is it an in-memory hsqldb instance?      If it is, I'd consider changing that to MySQL or Postgres or something else.

           

          There's a lot of other things you can tweak (heap size, etc), but I'd start with switching to using the applicationserver+ESB and changing your DB to start.

          1 of 1 people found this helpful
          • 2. Re: Heap Space Error while obtaining messages from esb message Database
            Andreas Falk Newbie

            Hi Tom,

            thanks for your quick reply. I'm sorry I was a little imprecise. We are currently using  JBoss 4.2.3 GA-Server in combination with  MySQL 5.5.10. I will check if we are able to upgrade to AS 5.1.0