Checking Builds by Label on browse/label resulting performance issues and high CPU usage

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      Checking Builds by Label on browse/label resulting performance issues and high CPU usage in Bamboo application server when you have large number of  BUILDRESULTSUMMARY_LABEL , BUILDRESULTSUMMARY, LABEL

      Steps to Reproduce

      This is reproducible in a large volume Bamboo instance

      1. create a Build plan and Plan labels
      2. create large number of Builds (thousands, millions)
      3. visit the <Bamboo-URL>/ browse/label?labelName=<LABEL_NAME> URL
      4. Monitor the high CPU spikes 

      Expected Results

      Loading the page quicker and less CPU spikes

      Actual Results

      Lots of stuck threads catalina.out on bamboo/browse/label/ URL

      Workaround

      To avoid CPU spikes, you can block users calling URL in your load-balancer.
      If you required to gather full details of build details associated with a label you can run the below query by replacing the <LABEL_NAME> value.

       SELECT *
      FROM
          BUILDRESULTSUMMARY_LABEL bl
      INNER JOIN
          BUILDRESULTSUMMARY bs ON bl.BUILDRESULTSUMMARY_ID = bs.BUILDRESULTSUMMARY_ID
      INNER JOIN
          LABEL l ON bl.LABEL_ID = l.LABEL_ID
      WHERE
          l.NAME ='<LABEL_NAME>'
          AND l.NAMESPACE = 'label'
      ORDER BY
          bs.BUILD_DATE DESC;
      

            Assignee:
            Mateusz Szmal
            Reporter:
            Vani
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: