Bamboo plan cache is initialized with only 1 thread when hibernate.c3p0.max_size is undefined

XMLWordPrintable

    • Severity 2 - Major

      Summary

      When no hibernate.c3p0.max_size is defined in <bamboo-home>/bamboo.cfg.xml (e.g. if a Tomcat JDBC Datasource is being used instead) then the Bamboo plan cache will be initialized with only a single thread. This can cause significant delays in start-up of Bamboo.

      Steps to Reproduce

      1. Configure a Tomcat JDBC Datasource
      2. Remove hibernate.c3p0.max_size from <bamboo-home>/bamboo.cfg.xml
      3. Start Bamboo

      Expected Results

      Plan cache is initialized thread count equal to available processors.

      Actual Results

      Plan cache is initialized with 1 thread:

      2018-04-22 13:07:10,053 INFO [localhost-startStop-1] [ImmutablePlanCacheServiceImpl] Initialising plan cache with 1 threads.
      

      Workaround

      1. Stop Bambo
      2. Edit your <bamboo-install>/bin/setenv.sh (or equivalent) and add the below. Set the value to the amount of CPU processors available (aka the result of nproc --all)
        : ${JVM_SUPPORT_RECOMMENDED_ARGS:="-Datlassian.bamboo.plan.cache.loading.threads=8"}
        
      3. Start Bamboo

              Assignee:
              Alexey Chystoprudov
              Reporter:
              Jeremy Owen
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: