activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skagenkaf <...@skagenfondene.no>
Subject Errors when using h2 as message store
Date Mon, 03 Nov 2014 13:29:25 GMT
Hi.

Ive configured activemq with a JdbcPersistenceAdapter using h2 with a
jdbc-url like this: "jdbc:h2:mem:test".

I start 10 threads that produce 5000 modest size text messages, and a thread
that consumes. After a short while I get a lot of error messages like below. 

Any clues to what cause this would be appreciated :)


2014-10-28 22:03:57,507 [ActiveMQ Transport: tcp:///127.0.0.1:61355@61616]
WARN  o.a.a.s.jdbc.JDBCPersistenceAdapter - Error while closing connection:
Timeout trying to lock table ; SQL statement:
INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION,
PRIORITY, MSG, XID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [50200-181], due to:
Timeout trying to lock table ; SQL statement:
INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION,
PRIORITY, MSG, XID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [50200-181] 
org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement:
INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION,
PRIORITY, MSG, XID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [50200-181]
        at
org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.message.DbException.get(DbException.java:168)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.Command.filterConcurrentUpdate(Command.java:301)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.Command.executeUpdate(Command.java:256)
~[h2-1.4.181.jar:1.4.181]
        at
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:157)
~[h2-1.4.181.jar:1.4.181]
        at
org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1183)
~[h2-1.4.181.jar:1.4.181]
        at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2465)
~[c3p0-0.9.5-pre9.jar:0.9.5-pre9]
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:108)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:86)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:134)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:132)
[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(MemoryTransactionStore.java:343)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.memory.MemoryTransactionStore$1.asyncAddQueueMessage(MemoryTransactionStore.java:159)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:910)
[activemq-broker-5.10.0.jar:5.10.0]
        at org.apache.activemq.broker.region.Queue.send(Queue.java:733)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:424)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:445)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:297)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:147)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:307)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:152)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:496)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:756)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
[activemq-client-5.10.0.jar:5.10.0]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
Caused by: org.h2.jdbc.JdbcSQLException: Concurrent update in table
"ACTIVEMQ_MSGS": another transaction has updated or deleted the same row
[90131-181]
        at
org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.message.DbException.get(DbException.java:179)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.message.DbException.get(DbException.java:155)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:145)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.mvstore.db.MVTable.addRow(MVTable.java:620)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.dml.Insert.insertRows(Insert.java:156)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.dml.Insert.update(Insert.java:114)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.CommandContainer.update(CommandContainer.java:78)
~[h2-1.4.181.jar:1.4.181]
        at org.h2.command.Command.executeUpdate(Command.java:254)
~[h2-1.4.181.jar:1.4.181]
        ... 29 common frames omitted
2014-10-28 22:03:57,509 [ActiveMQ Transport: tcp:///127.0.0.1:61355@61616]
INFO  o.a.a.util.DefaultIOExceptionHandler - Ignoring SQLException,
java.io.IOException: Timeout trying to lock table ; SQL statement:
INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION,
PRIORITY, MSG, XID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [50200-181] 
org.h2.jdbc.JdbcBatchUpdateException: Timeout trying to lock table ; SQL
statement:
INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION,
PRIORITY, MSG, XID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [50200-181]
        at
org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1198)
~[h2-1.4.181.jar:1.4.181]
        at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2465)
~[c3p0-0.9.5-pre9.jar:0.9.5-pre9]
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:108)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:86)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:134)
~[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:132)
[activemq-jdbc-store-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(MemoryTransactionStore.java:343)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.store.memory.MemoryTransactionStore$1.asyncAddQueueMessage(MemoryTransactionStore.java:159)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:910)
[activemq-broker-5.10.0.jar:5.10.0]
        at org.apache.activemq.broker.region.Queue.send(Queue.java:733)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:424)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:445)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:297)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:147)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:307)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:152)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:496)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:756)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
[activemq-broker-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
[activemq-client-5.10.0.jar:5.10.0]
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
[activemq-client-5.10.0.jar:5.10.0]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]




--
View this message in context: http://activemq.2283324.n4.nabble.com/Errors-when-using-h2-as-message-store-tp4686889.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message