How To query/get Concurrent load/other statistics on our Stash instance w.r.t 'Scaling Stash'?

We get the 'resource limits reached' from time to time. We have increased the CPUs and Memory on the VM that Stash is running in. We would like to prevent this from taking us surpise in the furture, and please can you advise on which parameters to monitor, to give us prior warning that we need to 'Scale' Stash before we actually hit the 'Resource Limits reached' error message. For exmaple, is there a DB query we can run (or other command) to get

(i) The number of commits we have had so far in each Stash Project. We have many Stash projects each with many repositories.

(ii) How do we find the size of a repository, and ,map it back to the repository name,

(iii) How do we get an idea of level of concurrent requests we are currently getting, so that we can monitor this and compare to our throttling limits etc. Can we do this by running a query or other means? If we know this information, then ideally we can flag an alert using Monitoring software, to tell our admin team they need to look at increasing Stash resource sizes etc. We are currently using Jenkins CI software, which has the number of executors set to 4.

(iv) What is/are the log message(s) that is/are written to the log file indicating that we are about to, or have a resource limit problem. If we have this, we can check for it in our monitoring software, and if we encounter it, flag an alert accordingly.

(v) Any other ideas?

Any help is much appreciated. Thanks

1 answer

Hi Rajiv,

If you haven't already I might suggest raising a support ticket so we can answer you questions in more detail. Generally you shouldn't be seeing that error unless something is configured configured.

(i) The number of commits is not really going to be a cause of resource limits, it's more likely your CI load. And generally we try not to store/cache anything related to Git in the database, so basically there isn't much you can 'query' short of running git commands in $STASH_HOME/data/repositories/$REPO_ID.

(ii) https://bitbucket.org/atlassian/stash-reponame-pluginis that useful?

(iii) One easy way to check is in the access logs, which ouputs the concurrent requests for each line.

https://confluence.atlassian.com/display/STASHKB/Stash+Log+Formats

These may also be of interest:

https://confluence.atlassian.com/display/STASH/Scaling+Stash

https://confluence.atlassian.com/display/STASH/Scaling+Stash+for+Continuous+Integration+performance

Cheers,

Charles

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

416 views 5 9
Read article

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