stash removing cache

my files system for stash is 100% full and I want to remove some of the large files that are cached as caches is taking up the space, what is the best manner to accomplish this?


2 answers

1 accepted

1 vote

You're most likely running into space issues because of the caches under STASH_HOME/cache/scm. These are caches for git operations such as ref advertisement and clone. Especially clones can be fairly large depending on the size of your repositories.

The scm-cache has a 'minimum free space' setting for controlling when it will stop caching. Default is 1Gb but you can configure a higher value in your You'll need to restart Stash to apply the new configuration. 

What do I put in the file? Also is it possible that we do not have a minimum free space set to on as it filled the partition to 100%, all that is on that partition is stash's home. We almost never have more than a Gig of free space there...

This is the default that Stash uses if you haven't overridden it. # Controls when caching is disabled because there is not enough space available on the file system # Configured value is in BYTES. The default is 1GB When there is less than 1GB free Stash won't write to the cache. However, if you have 1.5GB free and then clone a repository that is 1GB you'll end up with 500MB free. Ideally, you'd configure this setting to be a bit higher than the size of your largest repository. If you're not using a CI server for builds or you only have a small number of builds, you can also disable the caching completely by adding this to you plugin.stash-scm-cache.upload-pack.enabled=false

The cleanest way of removing the cache is restarting the Stash service. In order to avoid the same problem in the future, set this in your Stash config to the desired value:

#min. disk space left by caching, 32GB

(The default value is very small.)

That looks fairly large, We do not have a lot of space on that disk. And if there was a default why would it fill up the partition to 100%? Currently we have the home in its own partition which is 6 gig. What should I set the minimum to?

As Michael said above, the default is 1GB, I think that should be good for you. If the disk got completely full, it was probably not the cache that filled the last 1GB. Check what else is big. For us the log files can accumulate to quite much data, especially when debug logging is on.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,995 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you