Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-5552

"ORA-01000: maximum open cursors exceeded" during incremental review indexing

    XMLWordPrintable

Details

    Description

      My current theory is it's related to this issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2033

      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)
      

      Note the position of the exception in ReviewInfoDAO.java:

                  boolean inReview = reviewManager.isConsideredInReview(fr, reviewId);
                  boolean isClosed = reviewManager.anyReviewsConsideredInStateContainingFileRevision(closedStates, fr);
      --->        boolean isOpen = reviewManager.anyReviewsConsideredInStateContainingFileRevision(openStates, fr);
                  boolean isDraft = reviewManager.anyReviewsConsideredInStateContainingFileRevision(draftStates, fr);
      

      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.

      Attachments

        Issue Links

          Activity

            People

              mstudman Michael Studman (Inactive)
              mstudman Michael Studman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 38m
                  38m