Limit the resources Bazel is allowed to use during the build to 1/2 the available RAM and 3/4 the available CPU cores. This should help avoid overwhelming the build machine.