We do enforce the following limits to prevent Bitbucket use in a way that consumes a disproportionate amount of system resources (CPU’s, memory, disk space, bandwidth, etc.) or that would adversely impact the performance or operation of Bitbucket for other Bitbucket users. Outside of the enforced limits this page contains some general "good neighbor" suggestions for using Bitbucket.
- Soft limit 1 GB: We will notify you by email and with a notification bar in Bitbucket.
- Hard limit 2 GB: We will disable your ability to push to the repository. You will be notified by email and with a notification bar in Bitbucket.
See the following table for more information about repository size and other system limits. To find the size of your repository see, Finding your repository size.
|Limit type||Size or number of occurrences||Reason|
Repository size: the total size of your repository on Bitbucket.
To see the size of your repository see, Finding your repository size.
1 GB soft limit
We will notify you, with an information bar in Bitbucket, once your repository reaches the 1 GB mark.
Pay attention to this limit. Even though it is a soft limit it is intended to make you aware of the size of your repository, so you can take action before you approach the 2 GB hard limit which has more serious consequences.
Some actions you can take to reduce the size of your repository before you hit this limit:
If your repository is greater than 1 GB, you should consider if you are using Bitbucket correctly. Keep in mind Bitbucket is a code hosting service not a file sharing service, we offer some suggestions for binaries .
For more information about managing your repository size, see Reduce repository size.
2 GB hard limit
We will disable the ability to push to your repository and you will have to split or reduce your repository locally, and then create a new repository and push the code to the new repository.
This limit is a "hard limit," which matches our download limit, and helps us maintain a high level of service for all our users. Git and Mercurial repositories are inefficient at these sizes so the performance you experience locally will be degraded as well as consuming more resources on our systems.
File requests: the number of times a file is actively downloaded
This is not a limit on actions such as:
|5000 requests per hour||This is to prevent use of Bitbucket as a Content Delivery Network (CDN) which would consume a disproportionate amount of resources. Amazon's CloudFront is a much better choice if you need to simply host your compiled project binaries.|
Downloading archive .zip files
These archive files are accessed from the Downloads page.
Must be no larger than 2 GB.
|Creating and downloading archive files over 2 GB consumes huge amounts of processing and bandwidth. For these types of requests, we recommend taking a copy of your archive locally or using a CDN if you need to widely distribute a file.|
Finding your repository size
To check the relative size of your repository in Bitbucket click Settings (1), which should open the Repository details (2) page, then look for the Size (3) line.
Git Repository Size from the Command Line
For Git, you can use the
git count-objects -v command:
The size-pack value is the size of your repository when it is pushed to a remote server like Bitbucket. The size-pack value is in kilobytes. So, in the above example the repository is not even 1 MB.
Mercurial Repository Size from the Command Line
Mercurial does not provide a command specifically for find a repository repository size. You can use the bundle command to generate a compression of your repository and then see the size of the file:
git count-objects -vcommand:
Have a lot of binaries such as images or sounds?
Keep in mind Bitbucket is a code hosting service not a file sharing service. If a lot of your files are extremely large or if your files are binaries or executables, you should understand Git or Mercurial will not work well with them. You'll find that even locally your repository is barely usable. Moreover, Bitbucket can't display diffs on binaries.
For binary or executable storage, we recommend you look into file hosting services such as DropBox, rsync, rsnapshot, rdiff-backup, and so forth. Still not sure what to do? Review this post on stackoverflow for more ideas.