Maximum open cursors exceeded with JBM on startup of EAP 5
Issue
- We had to restart our servers a couple of times to fix various issues. During these, about 5000 messages seems to have accumulated in the JBM_MSG and JBM_MSG_REF tables. When starting JBoss we get:
[main] S: U: (org.jboss.jms.server.destination.QueueService:183) INFO - Queue[/queue/OversightPrivilege] started, fullSiz
e=200000, pageSize=2000, downCacheSize=2000
[main] S: U: (org.jboss.messaging.core.impl.JDBCSupport:724) WARN - SQLException caught, SQLState 60000 code:604- assuming deadlock detected, try:1
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
at org.jboss.messaging.core.impl.JDBCPersistenceManager$1MessageClaimRunner.doTransaction(JDBCPersistenceManager.java:3581)
at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:658)
at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:698)
at org.jboss.messaging.core.impl.JDBCPersistenceManager.claimMessagesInSuck(JDBCPersistenceManager.java:3603)
at org.jboss.messaging.core.impl.PagingChannelSupport.load(PagingChannelSupport.java:209)
at org.jboss.messaging.core.impl.MessagingQueue.load(MessagingQueue.java:519)
at org.jboss.jms.server.destination.QueueService.startService(QueueService.java:109)
- Database cursor wasn't released from messaging. when we try to start a jms instance the following error is being returned form the IBM jdbc driver:
Exception stack trace:
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-805, SQLSTATE=51002, SQLERRMC=NULLID.SYSLH20A 0X5359534C564C3031, DRIVER=3.67.27
com.ibm.db2.jcc.am.gd.a(gd.java:752)
com.ibm.db2.jcc.am.gd.a(gd.java:66)
com.ibm.db2.jcc.am.gd.a(gd.java:135)
com.ibm.db2.jcc.am.so.c(so.java:2763)
com.ibm.db2.jcc.t4.ab.p(ab.java:934)
com.ibm.db2.jcc.t4.ab.h(ab.java:144)
com.ibm.db2.jcc.t4.ab.b(ab.java:41)
com.ibm.db2.jcc.t4.o.a(o.java:32)
com.ibm.db2.jcc.t4.tb.i(tb.java:145)
com.ibm.db2.jcc.am.so.ib(so.java:2169)
com.ibm.db2.jcc.am.to.tc(to.java:3547)
com.ibm.db2.jcc.am.to.b(to.java:4345)
com.ibm.db2.jcc.am.to.hc(to.java:782)
com.ibm.db2.jcc.am.to.executeUpdate(to.java:760)
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
org.jboss.messaging.core.impl.JDBCPersistenceManager$1MessageClaimRunner.doTransaction(JDBCPersistenceManager.java:3556)
org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:658)
org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:698)
org.jboss.messaging.core.impl.JDBCPersistenceManager.claimMessagesInSuck(JDBCPersistenceManager.java:3578)
org.jboss.messaging.core.impl.PagingChannelSupport.load(PagingChannelSupport.java:209)
org.jboss.messaging.core.impl.MessagingQueue.load(MessagingQueue.java:519)
org.jboss.jms.server.destination.QueueService.startService(QueueService.java:109)
.. .. ..
Concurrently open statements:
1. SQL string: UPDATE JBM_MSG_REF SET STATE='C' WHERE CHANNEL_ID = ? AND MESSAGE_ID = ? AND STATE='S'
Number of statements: 4011
2. SQL string: SELECT MIN(PAGE_ORD), MAX(PAGE_ORD) FROM JBM_MSG_REF WHERE CHANNEL_ID = ?
Number of statements: 1
3. SQL string: SELECT QUEUE_NAME, COND, SELECTOR, CHANNEL_ID, CLSTERED, ALL_NODES FROM JBM_POSTOFFICE WHERE POSTOFFICE_NAME=? AND NODE_ID=?
Number of statements: 1
.. .. ..
I found an old document JBoss Document "https://issues.jboss.org/browse/SOA-377" with a workaround to replace : <prepared-statement-cache-size>200</prepared-statement-cache-size>
with
<prepared-statement-cache-size>50</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
And after that the instance was started without errors. Is there an issue with jboss-messaging? Can Red Hat explain what is causing this behaviour?
Environment
- JBoss Enterprise Application Platform (EAP) 5.1.2 , 5.2.0
- JBoss Messaging (JBM)
- Databases Oracle, DB2
- On startup of EAP instance
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
