Nested database connection acquisition can cause connection-pool starvation under concurrent load

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 10.4.3, 10.2.9, 9.4.27
    • Component/s: Authentication
    • None
    • 1
    • Severity 3 - Minor
    • 6

      Issue Summary

      Some Bitbucket operations retain a database connection while requesting another connection from the same pool. Under concurrent load, this can exhaust available connections and prevent requests from progressing until another operation releases a connection or an acquisition times out.

      Confirmed affected paths include built-in access-token and SSH authentication, and mergeability checks whose hooks access plugin settings.

      Steps to Reproduce

      1. Run these operations at high concurrency

      Expected Results

      System progresses even under high load.

      Actual Results

      The system stalls and the below exception is thrown in the atlassian-bitbucket.log file:

      Connection is not available, request timed out after 15000ms
      

      Workaround

      Increasing db.pool.size.max can help, although a similar change has to be made on the database side to allow for more concurrent connections.

              Assignee:
              Unassigned
              Reporter:
              Wolfgang Kritzinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: