> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/buildbuddy-io/buildbuddy/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting Slow Uploads

> Fix timeout and performance issues with build artifact uploads

This guide helps you troubleshoot slow upload issues when building with BuildBuddy.

## Common Upload Issues

<AccordionGroup>
  <Accordion title="The Build Event Protocol upload timed out">
    This error means the `bes_timeout` [flag](https://bazel.build/reference/command-line-reference#build-flag--bes_timeout) is likely set to a value that's not long enough for bazel to finish uploading all build artifacts.

    ### Solution

    We recommend using the following flag to increase this upload timeout:

    ```bash theme={null}
    --bes_timeout=600s
    ```

    <Note>
      These slow uploads should only happen once when artifacts are initially written to the cache, and shouldn't happen on subsequent builds.
    </Note>
  </Accordion>

  <Accordion title="Waiting for build events upload">
    If your build has finished but you're frequently sitting around waiting for build events to upload - you're likely in a network constrained environment trying to upload large build artifacts like docker images or large binaries.

    ### Solution for Network Constrained Environments

    We recommend running with the flag:

    ```bash theme={null}
    --noremote_upload_local_results
    ```

    <Info>
      This will upload build, test, and profiling logs - but not the larger build artifacts that can take much longer to upload.
    </Info>
  </Accordion>
</AccordionGroup>

## Quick Reference

<CardGroup cols={2}>
  <Card title="Increase Timeout" icon="clock">
    Use `--bes_timeout=600s` to allow more time for uploads
  </Card>

  <Card title="Skip Large Artifacts" icon="filter">
    Use `--noremote_upload_local_results` to skip uploading large build artifacts
  </Card>
</CardGroup>
