-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Affects Version/s: 6.1.1
-
Component/s: Plan Branches, Plan configuration
-
Severity 2 - Major
Summary
Bamboo gets extremely slow after updating a task on a plan with multiple branches (e.g. hundreds or even thousands of branches). The more branches you add to your plan, the more time it takes to load pages that need to access plan cache information, because Bamboo invalidates the plan cache when editing a task.
Steps to Reproduce
- Create two plans inside Bamboo.
- Create a Script task inside the job from each plan with a simple echo.
echo "Hello world!"
- Create a few plan branches inside the first plan.
- Create ~1000 plan branches inside the second plan.
- Open two different tabs in your browser and access the job configuration page for both plans.
- Inside the second plan open up the Script task and save it – it's not even necessary to perform changes, just save the task.
- After that click something else, try to access another task if you have one or click the Job details or even Requirements tab.
- Now back to the tab with the first plan open, click around as well (e.g. Job details tab, Requirements tab, Artifacts tab, and etc).
- Open a third tab and access the Bamboo Build Dashboard page.
Expected Results
- You are able to navigate and access all the information across all tabs with no problems and more importantly, with no delays.
Actual Results
- Inside the tab with the first plan open you can actually navigate with no problems. It's a rather small plan with only a handful of branches. Furthermore since you're inside the plan, it is not necessary to load/access the cache from other plans.
- For the tab with the second plan nothing happens, Bamboo just hangs and waits until it finishes updating the task you saved and rebuild the plan cache. Inside a plan with ~1000 plan branches this can take up to 5 minutes of waiting.
- All other pages that attempt to access that plan cache information (e.g. Build Dashboard, Build activity, and etc) will also hang and it turn all other users have to wait until Bamboo is done updating the cache information because one user updated a task. This is a huge problem because one user, editing a single task, can halt Bamboo and prevent other users from accessing the application.
- None of the administrative pages are affected because we're not accessing plan cache information there, so one would not even notice the problem while going through the Agents page, Server capabilities or even the Users and Groups page. None of the admin pages demonstrate slowness.
Workaround
- Reduce the number of plan branches across all your plans to less than 100 plan branches or even less than that, if possible.
- Use Specs to update the plan configuration as opposed to the UI. Split the plan into many plans, each having only a subset of (somehow logically-divided) plan branches. This way Specs would become beneficial and a good replacement for the UI in a few ways:
- Even without limiting number of plan branches, updating of tasks will happen in the background, so users won't have to wait for each operation to finish to proceed.
- It will make it easier to limit number of plan branches, because it will be easier to create multiple plans sharing similar logic (same code in Specs, just different key and name for each plan, mainly to ensure consistency), and each one of the plans could have just a small number of plan branches, not all of them at once.