activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: JDBC persistence, Scheduler and OOM
Date Sat, 01 Mar 2014 00:07:02 GMT
what version of activemq?


On Wed, Feb 26, 2014 at 7:52 AM, fliot <francois@liot.org> wrote:
> Hi,
>
> We run activemq web console + broker as a war app in tomcat, with "-Xms2048m
> -Xmx8192m -XX:MaxPermSize=3072m -Xss256k".
>
> We did follow JDBC persistence tutorial, and we use :
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>     <property name="locations">
>       <value>/etc/myfolder/activemq-persistence.properties</value>
>     </property>
>   </bean>
>   <bean id="storeDataSource" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>     <property name="driverClassName"
> value="${broker.store.jdbc.driverClass}"/>
>     <property name="url"
> value="${broker.store.jdbc.url}?relaxAutoCommit=true"/>
>     <property name="username" value="${broker.store.jdbc.user}"/>
>     <property name="password" value="${broker.store.jdbc.password}"/>
>     <property name="poolPreparedStatements" value="true"/>
>   </bean>
>
>   <broker brokerName="web-console" useJmx="true"
> xmlns="http://activemq.apache.org/schema/core" persistent="true"
> deleteAllMessagesOnStartup="false" schedulerSupport="false"
> advisorySupport="true">
>     <persistenceAdapter>
>
>       <jdbcPersistenceAdapter dataSource="#storeDataSource" />
>     </persistenceAdapter>
>         <systemUsage>
>                 <systemUsage>
>                         <memoryUsage>
>                                 <memoryUsage limit="0"/>
>                         </memoryUsage>
>                         <storeUsage>
>                                 <storeUsage limit="0"/>
>                         </storeUsage>
>                         <tempUsage>
>                                 <tempUsage limit="256mb"/>
>                         </tempUsage>
>                 </systemUsage>
>         </systemUsage>
>
>
> And we regularly obtain :
> Exception in thread "ActiveMQ Broker[web-console] Scheduler"
> java.lang.OutOfMemoryError: Java heap space
>         at com.mysql.jdbc.Buffer.getBytes(Buffer.java:207)
>         at com.mysql.jdbc.Buffer.readLenByteArray(Buffer.java:339)
>         at com.mysql.jdbc.BufferRow.getColumnValue(BufferRow.java:331)
>         at com.mysql.jdbc.ResultSetImpl.getBytes(ResultSetImpl.java:1939)
>         at com.mysql.jdbc.ResultSetImpl.getBytes(ResultSetImpl.java:1917)
>         at
> org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:242)
>         at
> org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:242)
>         at
> org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:242)
>         at
> org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.getBinaryData(DefaultJDBCAdapter.java:78)
>         at
> org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:1068)
>         at
> org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:278)
>         at
> org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:106)
>         at
> org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:106)
>         at
> org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:258)
>         at
> org.apache.activemq.broker.region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java:145)
>         at
> org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:131)
>         at
> org.apache.activemq.broker.region.Queue.doPageInForDispatch(Queue.java:1876)
>         at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:2086)
>         at org.apache.activemq.broker.region.Queue.doBrowse(Queue.java:1096)
>         at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:905)
>         at org.apache.activemq.broker.region.Queue.access$100(Queue.java:79)
>         at org.apache.activemq.broker.region.Queue$2.run(Queue.java:120)
>         at
> org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
>         at java.util.TimerThread.mainLoop(Timer.java:555)
>         at java.util.TimerThread.run(Timer.java:505)
>
>
> Any idea ?
>
> Thanks in advance.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/JDBC-persistence-Scheduler-and-OOM-tp4678363.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Mime
View raw message