.sonar cache folder just keeps growing

Hi,

was alerted by one of our devs this morning that one of our build agents is out of disk space. I’ve ran a tool to identity what folders are taking up the most space and one of the culprits is the sonar cache folder. Its currently sitting at just under 16GB!

Is there a setting to trim this folder or is it a case of manually deleting them?

Hi,

Would you mind sharing your SonarQube and scanner versions?

 
Thx,
Ann

we use sonar cloud, I’ll pull out some details from the pipeline that I think you may find useful…

Starting: SonarCloudPrepare

Task : Prepare Analysis Configuration
Description : Prepare SonarCloud analysis configuration
Version : 1.41.0
Author : sonarsource

SonarScanner for MSBuild 5.15

Using the .NET Framework version of the Scanner for MSBuild

Starting: Run SonarCloud analysis

Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.44.0
Author : sonarsource
Help : Version: 1.44.0.

and from the yaml, we are using the following tasks:
SonarCloudPrepare@1
SonarCloudAnalyze@1
SonarCloudPublish@1

Hi,

You filed this under SonarCloud. Sorry I overlooked that. :woman_facepalming:

Off-hand, I don’t think you’re supposed to have to manage this, but looking at my own local .sonar/cache I see entries going back a year, so…

I was looking for versions so I could check Jira, but nothing is jumping out at me, so I’m going to flag this for the team.

 
Ann

Hi,

Thanks for your report!
We have an internal ticket to fix this infinitely-growing cache problem. I’ll add your report to it.
In the meantime it is safe to wipe it completely to restart from scratch. There is no setting for this, it is a manual operation.

Have a nice day,
Claire

2 Likes

ok thanks for getting back to me.

We have 6 build agents to manage so I feel a schedule task is on the cards :slight_smile:

2 Likes