Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-3531Borrow broker from pool failed
      KULRICE-11871IT Failure PersonServiceImplTest.testLookupWithPersonJoin PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey
      KULRICE-377Revist thread pooling strategy
      KULRICE-9432Optimize code in ViewHelperServiceImpl
      KULRICE-7944Change view pooling to use a thread pool
      KULRICE-2673Optimize the RuleService.getDuplicateRuleId check
      KULRICE-10549Thread pool configuration and queueing algorithm
      KULRICE-6757KSPD: Investigate Optimization options for ViewServiceImpl
      KULRICE-7185Optimization of KIM Permission Checks
      KULRICE-14262Optimize Amazon RDS usage
    • Rice Module:
      Rice Core
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Contributing Institution:
      Michigan State Univ

      Description

      optimize the broker pool so it does not grab as many new brokers.

      This is brief description of the PersistenceBroker issue which we faced in MSU and fixed :
      Actaully there is a file called OJB.properties which is used while initializing the OJB configuration during the application start up.
      We have a property called maxActive which specifies the number of persistenceBrokers that are available at a point of time .
      Since we use OJB as ORM access to each db call is made through the PersistenceBroker object.
      Edocs in PURAP module like Requisition and recurring PREQS makes use of lot of PB objects eventually exceeding the max active count as a result this
      exception usually arises :
      org.springframework.dao.DataAccessResourceFailureException: Could not open OJB PersistenceBroker; nested exception is org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=enWorkflowDataSource, user=null, password=null

      Caused by:

      org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=enWorkflowDataSource, user=null, password=null

      at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:120)

      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.createPersistenceBroker(PersistenceBrokerFactorySyncImpl.java:122)

      at org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(PersistenceBrokerFactory.java:104)

      at org.springmodules.orm.ojb.OjbFactoryUtils.getPersistenceBroker(OjbFactoryUtils.java:86)

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getPersistenceBroker(PersistenceBrokerTemplate.java:286)

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:139)

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getReportQueryIteratorByQuery(PersistenceBrokerTemplate.java:209)

      Caused by: java.util.NoSuchElementException

      at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:758)

      ... 160 more

      The above exception describes the pool maintained by PersistenceBrokerFactoryDefaultImpl the factory implementation which is responsible for
      maintaining the life cycle of PersistencBroker object is running out of objects since the limit is reached .

      When ever we make a call to DB for doing any operations the currently running thread checks whether it is bound to a Transaction Manager if it founds a transaction
      then from it tries to find the PB object bound to the current thread and releases it back to the pool after finishing , if it is not bound to any transaction manager
      then each operation to the DB borrows separate brokers and returns it to pool after it finishes.

        Activity

        Bin Gao made changes -
        Field Original Value New Value
        Summary broker pool optimization broker pool optimization (4067)
        Bin Gao made changes -
        Fix Version/s 2.1.3 [ 16606 ]
        Bin Gao made changes -
        Description optimize the broker pool so it does not grab as many new brokers optimize the broker pool so it does not grab as many new brokers.

        This is brief description of the PersistenceBroker issue which we faced in MSU and fixed :
        Actaully there is a file called OJB.properties which is used while initializing the OJB configuration during the application start up.
        We have a property called maxActive which specifies the number of persistenceBrokers that are available at a point of time .
        Since we use OJB as ORM access to each db call is made through the PersistenceBroker object.
        Edocs in PURAP module like Requisition and recurring PREQS makes use of lot of PB objects eventually exceeding the max active count as a result this
        exception usually arises :
        org.springframework.dao.DataAccessResourceFailureException: Could not open OJB PersistenceBroker; nested exception is org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=enWorkflowDataSource, user=null, password=null

        Caused by:

        org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey org.apache.ojb.broker.PBKey: jcdAlias=enWorkflowDataSource, user=null, password=null

                        at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:120)

                        at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.createPersistenceBroker(PersistenceBrokerFactorySyncImpl.java:122)

                        at org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(PersistenceBrokerFactory.java:104)

                        at org.springmodules.orm.ojb.OjbFactoryUtils.getPersistenceBroker(OjbFactoryUtils.java:86)

                        at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getPersistenceBroker(PersistenceBrokerTemplate.java:286)

                        at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:139)

                        at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getReportQueryIteratorByQuery(PersistenceBrokerTemplate.java:209)

         

        Caused by: java.util.NoSuchElementException

                at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:758)

                ... 160 more

        The above exception describes the pool maintained by PersistenceBrokerFactoryDefaultImpl the factory implementation which is responsible for
        maintaining the life cycle of PersistencBroker object is running out of objects since the limit is reached .

        When ever we make a call to DB for doing any operations the currently running thread checks whether it is bound to a Transaction Manager if it founds a transaction
        then from it tries to find the PB object bound to the current thread and releases it back to the pool after finishing , if it is not bound to any transaction manager
        then each operation to the DB borrows separate brokers and returns it to pool after it finishes.
         
         
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.1.4 [ 16750 ]
        Fix Version/s 2.1.3 [ 16606 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.2.3 [ 16788 ]
        Fix Version/s 2.1.4 [ 16750 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.2.4 [ 17010 ]
        Fix Version/s 2.2.3 [ 16788 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.2.5 [ 17030 ]
        Fix Version/s 2.2.4 [ 17010 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.3-backlog [ 16596 ]
        Fix Version/s 2.2.5 [ 17030 ]
        Shem Patterson (Inactive) made changes -
        Workflow custom [ 154246 ] Copy of custom for rice [ 207609 ]
        Shem Patterson (Inactive) made changes -
        Workflow Copy of custom for rice [ 207609 ] custom [ 217357 ]
        Shem Patterson (Inactive) made changes -
        Workflow custom [ 217357 ] Rice Workflow [ 227105 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s 2.4 [ 16913 ]
        Fix Version/s 2.4-backlog [ 16596 ]
        Jessica Coltrin (Inactive) made changes -
        Issue Type Bug Fix [ 1 ] Improvement [ 4 ]
        Jessica Coltrin (Inactive) made changes -
        Fix Version/s Backlog [ 15811 ]
        Fix Version/s 2.4 [ 16913 ]
        Kristina Taylor (Inactive) made changes -
        Rice Module Rice Core [ 10890 ]
        Eric Westfall made changes -
        Labels Old

          People

          • Assignee:
            Unassigned
            Reporter:
            Bin Gao
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Structure Helper Panel