What kind of limits do you have on repository/file size?
We enforce the following limits to prevent Bitbucket Cloud use in a way that consumes a disproportionate amount of system resources or that would adversely impact the performance or operation of Bitbucket Cloud for other users. In addition to the enforced limits, this page contains some general "good neighbor" suggestions for using Bitbucket.
- Soft limit 1 GB: You will be notified via a notification bar in Bitbucket Cloud.
- Hard limit 2 GB: Your ability to push to the repository will be disabled. You will be notified via a notification bar in Bitbucket Cloud.
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
You will be notified in Bitbucket once your repository reaches the 1 GB mark.
Pay attention to this 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 larger 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
Your ability to push to the repository will be disabled. 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 while 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 better choice for simply hosting 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, which should open the Repository details page, then look for the Size line.
- Repository details: Find the repository size on this page.
- Settings: Notice this link in the left panel.
- Size: Each repository includes a size under its name on this page.
Git Repository Size from the Command Line
For Git, you can use the
git count-objects -v command:
$ git count-objects -v
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:
$ hg bundle --all my-bundle.hg
2474 changesets found
$ ls -al my-bundle.hg
-rw-r--r-- 1 manthony staff 21658140 Feb 10 15:03 my-bundle.hg
Have a lot of binaries such as images or sounds?
Keep in mind Bitbucket Cloud 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.
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 stack overflow for more ideas.