Our repo size was between 1.2 GB to 1.4 GB for the past few months and suddenly as of last 1 hour, it bloated to 2.2 GB and we are not able to make anymore write operations. We are trying to check if there were any anomalies since the past 12 hours and we don't find any.
Is it possible for triggering garbage collection on our repo so that it could come back to under 2 GB to unblock us.
We are also considering bfg-repo-cleaner as suggested in the bitbucket documentation (we already tried this out the last time we hit this issue). But this time around, doesn't look like there were any faulty pushes.
Hi Shreyas, is your repo exceeding the 2GB locally? You can check the size of your repo running the following command:
git count-objects -Hv
If it's bigger than 2GB, you'll need to perform the following steps to bring the repo back to under 2GB:
(!) Make sure you have a local backup before trying the command above.
1. Do a git reset, as many commits back as needed to make the repo's size go below 2 GB:
git reset --hard <some_revision>
2. Push that to Bitbucket. This will remove the read-only limit:
git push --force
3. Now you'll be able to push the reduced version of your repo.
For more info, please visit Reduce repository size.
Let us know if you have any questions!
Ana
Hello Ana,
Thanks for the response.
I freshly clones my repo (which says 2.2 GB on bitbucket) locally and checked the git size, the size is roughly 1.1 GB.
git count-objects -v
count: 0
size: 0
in-pack: 720807
packs: 1
size-pack: 1147525
prune-packable: 0
garbage: 0
size-garbage: 0
Since there was an inconsistency of the git object size of our repo on bitbucket, I reached out to the bitbucket support and they performed garbage collection on the repo and confirmed that the repo size was back to 1.1 GB.
I wasn't sure why the repo size was inconsistently shown as 2.2 GB on bitbucket UI though.
Anyways, thanks for responding.
Thanks,
Shreyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad this is solved now, Shreyas :)
Have a good day!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.