Workaround: Long-running Build Agent builds can prevent other automated tasks from running

Workaround Summary

Build Agent builds run as background, asynchronous tasks on the server. When builds take a long time to run, the limited asynchronous task resources are consumed, and other asynchronous tasks are prevented from running.

More Information

Problem

Build Agent builds run as background, asynchronous tasks on the server. In certain cases, the builds can take a long time to run. For instance, the builds take a long time while waiting for a command on the target build agent to complete. By default, there are five asynchronous task resources. When builds take a long time to run, the task resources are consumed, and other long-running tasks are prevented from running, such as the build scheduler, build pruner, work item post-save tasks, and repository-level tasks for cleaning up deleted items and unreferenced content.

To see which asynchronous tasks and other requests are running, open the Active Services page in the admin web UI of the Change and Configuration Management (CCM) application. Build Agent builds are displayed with the following service name: com.ibm.rational.buildforge.buildagent.internal.service.RunBuildCommandTask.transactionSucceeded. If you see several Build Agent builds and notice that other asynchronous tasks are not running frequently enough, the Build Agent builds might be consuming all of the task resources.

Workaround

Increase the number of threads that are available to asynchronous tasks. On the Advanced Properties page in the CCM admin web UI, the “Asynchronous Task Pool Size” property is listed in the “com.ibm.team.repository.service.internal.AsynchronousTaskSchedulerService” category. The default value of the property is 5. Increase the default value to be the maximum number of Build Agent builds that you expect to run concurrently, plus 5. Because these threads are pre-allocated in the server, keep the value as small as possible to minimize resource usage but maintain acceptable throughput of Build Agent builds and other asynchronous tasks.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Feedback
Was this information helpful? Yes No 1 person rated this as helpful.