Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cloud showing 6GB size, local size is 1,7GB - ghost files?!

Marcel Aporius
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2019

Hello there,

unfortunately we ran into some problems with our repository.
A commit added some "ghost" files which bumped the repository to nearly 6GB. The actual size is 1,7GB though.
I'm not exactly sure how this happened and the files aren't showing in the cloud aswell (as it should be, since these files were in the project folder just for temporary reasons).

I think I found the commit where this happened but it was 5 commits ago and I'm not sure how to resolve this issue now without losing the progress made meanwhile.
Could this also be the reason why we ran into several problems with pushing and pulling the repo? Like getting "mmap failed invalid argument errors" and such?

I would love some help and/or some detailed instruction on what to do now (I'm just a simple basic user).

Best regards
Marcel

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2019

Hi Marcel

I've run a git gc on the remote and the size only decreased to 5.9 GB. Can you run the following command on your terminal and let us know the output?:

git count-objects -Hv

This is definitely why you're getting those issues. The maximum repository size in Bitbucket Cloud is 2GB and the repo will enter read-only mode once you surpass it, this is explained at What kind of limits do you have on repository file size.

To fix that you'll need to follow the instructions at Reduce repository size, make sure to make a copy of the repo before going ahead with those steps. 

Alternatively, if you don't care about keeping the history of the repo, you can copy your files to a new directory (making sure you're not adding the big files)and initialize a new repo.  

Let us know if you have any questions!

Ana

Marcel Aporius
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2019

Hi Ana,

I've run the command as requested:

count: 1223
size: 3.61 GiB
in-pack: 12223
packs: 19
size-pack: 5.86 GiB
prune-packable: 1221
garbage: 0
size-garbage: 0 bytes

I know that there is a 2GB limit and the commited projectfiles are, as I've already written, 1,7GB (should shrink more in the next few days).
Pulling the repo (when it works, as stated I got several errors) is giving me the 1,7GB of files the projectfiles should have, so there is definitly something else wrong.

A colleague is already initializing a new repo but since the upload is taking longer than expected and we would lose all the history I would like to see a solution on the existing repo.

Please let me know if you need any further information.

Marcel

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2019

Hi Marcel, thanks for your response!

The size of a repository is not only comprised by the files that are currently the active files in your project, but also by all the files that were ever part of it (as they're part of the history). From the output you shared with us, I can see the actual size of your repository is 5.86 GB.

You can try doing a repack and see if that helps, but the fact is that if you added that amount of files to your repository you won't be able to reduce the size easily. If that was done recently, you can reset back as many commits as necessary to a point where those files were not part of the repo, the instructions are explained at Reduce repository size. If they were added a long time ago, you'll need to rewrite the history, which is not an easy action. If you don't care about the history of the repo, my advice would be to make a copy of the files that are currently part of your repo (making sure they are under 2GB) and initialize a new repository with those files only. 

As always, don't forget to take a backup of your repository, just in case.

Hope this helps you understand the situation better. Let us know if everything is clear!

Kind regards,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events