activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-1870) JDBC exception when sending and receiving a lot of messages (MySQL 5 in use for persistence)
Date Tue, 09 Oct 2012 12:40:03 GMT

    [ https://issues.apache.org/jira/browse/AMQ-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472309#comment-13472309
] 

Gary Tully commented on AMQ-1870:
---------------------------------

I wonder what is causing the request for 50871918. It should be based on the page size for
the destination. 
@PJ, can you attach your xml configuration.

The original intent of maxrows was to force a table scan to see more than page size messages
such that priority messages or selector matching would work independent of the prefetch size
or requested dispatch size. It was not intended as a limit, rather as a way of extending the
scan.
In this case, it looks like the value being requested is way too large through some error.

Making maxRows an upper limit means we need to pick a better default value, one that is based
on the destination pageSize I think.
For the priority and sparse selecto use case, explicit values for pageSize are needed in any
event.
                
> JDBC exception when sending and receiving a lot of messages (MySQL 5 in use for persistence)
> --------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1870
>                 URL: https://issues.apache.org/jira/browse/AMQ-1870
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>         Environment: Active MQ 5.1, Windows XP, MySQL 5.0.45, MySQL Connector/J 5.1.5
>            Reporter: PJ Fanning
>            Assignee: Gary Tully
>             Fix For: 5.8.0
>
>         Attachments: AMQ-1870.patch
>
>
> The number of messages that were on the queue was approx 3 million when this exception
happened. Would it be possible to modify the code so that the setMaxRows value is kept to
a much lower number?
> java.sql.SQLException: setMaxRows() out of range. 50871918 > 50000000.
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
>         at com.mysql.jdbc.StatementImpl.setMaxRows(StatementImpl.java:2412)
>         at org.apache.commons.dbcp.DelegatingStatement.setMaxRows(DelegatingStatement.java:186)
>         at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:703)
>         at org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:230)
>         at org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:83)
>         at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:75)
>         at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:188)
>         at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java:104)
>         at org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:136)
>         at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1092)
>         at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1178)
>         at org.apache.activemq.broker.region.Queue.iterate(Queue.java:956)
>         at org.apache.activemq.thread.DeterministicTaskRunner.runTask(DeterministicTaskRunner.java:84)
>         at org.apache.activemq.thread.DeterministicTaskRunner$1.run(DeterministicTaskRunner.java:41)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message