com.cenqua.fisheye.rep.DbException: org.hibernate.QueryTimeoutException: could not execute query using iterate

Atlassian JIRA | Michael Studman [Atlassian] | 6 years ago
  1. 0

    My current theory is it's related to this issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2033 {code} com.cenqua.fisheye.rep.DbException: org.hibernate.QueryTimeoutException: could not execute query using iterate at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:165) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doSlurp(ReviewInfoDAO.java:109) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.slurp(ReviewInfoDAO.java:73) at com.cenqua.fisheye.rep.RepositoryEngine.doReviewSlurp(RepositoryEngine.java:348) at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:395) at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:25) at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:66) at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:132) at com.cenqua.fisheye.rep.RepositoryHandle.queuePingRequest(RepositoryHandle.java:122) at com.cenqua.fisheye.rep.ping.PingRequest.run(PingRequest.java:33) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.hibernate.QueryTimeoutException: could not execute query using iterate at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:124) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:500) at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:405) at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:248) at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1329) at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:69) at com.cenqua.crucible.model.managers.impl.DefaultReviewManager.anyReviewsConsideredInStateContainingFileRevision(DefaultReviewManager.java:721) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.processRevision(ReviewInfoDAO.java:283) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:155) ... 12 more Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:165) {code} Note the position of the exception in ReviewInfoDAO.java: {code} boolean inReview = reviewManager.isConsideredInReview(fr, reviewId); boolean isClosed = reviewManager.anyReviewsConsideredInStateContainingFileRevision(closedStates, fr); ---> boolean isOpen = reviewManager.anyReviewsConsideredInStateContainingFileRevision(openStates, fr); boolean isDraft = reviewManager.anyReviewsConsideredInStateContainingFileRevision(draftStates, fr); {code} So an un-closed iterate from the first call to reviewManager.anyReviewsConsideredInStateContainingFileRevision() may be causing the cursor count to be exceeded in the second call.

    Atlassian JIRA | 6 years ago | Michael Studman [Atlassian]
    com.cenqua.fisheye.rep.DbException: org.hibernate.QueryTimeoutException: could not execute query using iterate
  2. 0

    My current theory is it's related to this issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2033 {code} com.cenqua.fisheye.rep.DbException: org.hibernate.QueryTimeoutException: could not execute query using iterate at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:165) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doSlurp(ReviewInfoDAO.java:109) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.slurp(ReviewInfoDAO.java:73) at com.cenqua.fisheye.rep.RepositoryEngine.doReviewSlurp(RepositoryEngine.java:348) at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:395) at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:25) at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:66) at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:132) at com.cenqua.fisheye.rep.RepositoryHandle.queuePingRequest(RepositoryHandle.java:122) at com.cenqua.fisheye.rep.ping.PingRequest.run(PingRequest.java:33) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.hibernate.QueryTimeoutException: could not execute query using iterate at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:124) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:500) at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:405) at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:248) at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1329) at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:69) at com.cenqua.crucible.model.managers.impl.DefaultReviewManager.anyReviewsConsideredInStateContainingFileRevision(DefaultReviewManager.java:721) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.processRevision(ReviewInfoDAO.java:283) at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:155) ... 12 more Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:165) {code} Note the position of the exception in ReviewInfoDAO.java: {code} boolean inReview = reviewManager.isConsideredInReview(fr, reviewId); boolean isClosed = reviewManager.anyReviewsConsideredInStateContainingFileRevision(closedStates, fr); ---> boolean isOpen = reviewManager.anyReviewsConsideredInStateContainingFileRevision(openStates, fr); boolean isDraft = reviewManager.anyReviewsConsideredInStateContainingFileRevision(draftStates, fr); {code} So an un-closed iterate from the first call to reviewManager.anyReviewsConsideredInStateContainingFileRevision() may be causing the cursor count to be exceeded in the second call.

    Atlassian JIRA | 6 years ago | Michael Studman [Atlassian]
    com.cenqua.fisheye.rep.DbException: org.hibernate.QueryTimeoutException: could not execute query using iterate
  3. 0

    h3. Summary DBPC configuration {{pool-prepared-statements}} set to true leads to Statement Leak, In case of Oracle DB it will be 'ORA-01000: maximum open cursors exceeded' h3. Steps to Reproduce # Configure {{pool-prepared-statements}} to true # Wait h3. Expected Results No pool exception. h3. Actual Results The below exception is thrown in the atlassian-jira.log file: {noformat} ... java.sql.SQLException: ORA-01000: maximum open cursors exceeded at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:179) at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.find(DelegatingActiveObjects.java:93) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) ... {noformat} h3. Notes DBCP bug: [DBCP-372|https://issues.apache.org/jira/browse/DBCP-372], fixed in 1.5/2.x, JIRA uses 1.3/1.4 Note from: https://commons.apache.org/proper/commons-dbcp/configuration.html NOTE - Make sure your connection has some resources left for the other statements. Pooling PreparedStatements may keep their cursors open in the database, causing a connection to run out of cursors, especially if maxOpenPreparedStatements is left at the default (unlimited) and an application opens a large number of different PreparedStatements per connection. To avoid this problem, maxOpenPreparedStatements should be set to a value less than the maximum number of cursors that can be open on a Connection. h3.Workaround Remove {{pool-prepared-statements}} option (set to false)

    Atlassian JIRA | 1 year ago | Andriy Yakovlev [Atlassian]
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    maximum cursors

    Oracle Community | 1 decade ago | 843859
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded
  6. 0

    oracle max cursors problem

    Oracle Community | 1 decade ago | 3004
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      ORA-01000: maximum open cursors exceeded

      at com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental()
    2. com.cenqua.fisheye
      ReviewInfoDAO.doIncremental
      1. com.cenqua.fisheye.rep.impl.ReviewInfoDAO.doIncremental(ReviewInfoDAO.java:165)
      1 frame