Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

stash removing cache

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 20, 2014

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
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2014

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 stash-config.properties You'll need to restart Stash to apply the new configuration. 

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2014

What do I put in the stash-config.properties 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...

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 21, 2014

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 plugin.stash-scm-cache.minimum.free.space=1073741824 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 stash-config.properties: plugin.stash-scm-cache.upload-pack.enabled=false

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2014

Thanks!

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 20, 2014

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
plugin.stash-scm-cache.minimum.free.space=34359738368

(The default value is very small.)

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2014

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?

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2014

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
TAGS
AUG Leaders

Atlassian Community Events