Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-9734

Server temp storage grows on Windows due to cache under temp/ce not cleaned up

    Details

      Description

      When running SonarQube under Windows, size of <sonar_install_dir>/temp/ce can keep on growing, potentially causing disk space shortage over time. Restarting SonarQube does free-up space, but the restart can take a long time due to lengthy file cleanup under <sonar_install_dir>/temp/ce.

      Context: SonarQube running on Windows OS, Background Tasks being processed in Compute Engine

      Reproducing:

      • reproduced with both LTS v5.6.6 and latest v6.5
      • start SonarQube
      • at this point <sonar_install_dir>/temp should not contain any ce folder
      • run a project analysis
      • Background Task processes, notice the folders created under temp/ce
      • once Background Task is complete: notice how the new folder under temp/ce is not cleaned-up (illustration @ temp_storage.png). Other folders (for other analysis) will accumulate over time, causing more and more disk occupation.

      Notes:

      • even once the Background Task is complete, the new folder under temp/ce cannot be deleted . One must reanalyse the same project, for the old folder to be 'deletable' manually. See temp_storage.png.
      • enabling TRACE logs in sonar.properties reveals a relevant stacktrace in the Background Task log: stack_56_lts.txt (LTS), ce_65_log.txt (v6.5). Error message clearly being:
        java.nio.file.FileSystemException: C:\Users\IEUser\Downloads\sonarqube-6.5\sonarqube-6.5\temp\ce\5773160643374514857\6913687925200040222\source-2.txt: The process cannot access the file because it is being used by another process.
        

        Attachments

        1. ce_65_log.txt
          86 kB
        2. stack_56_lts.txt
          3 kB
        3. temp_storage.png
          temp_storage.png
          385 kB

          Issue Links

            Activity

              People

              • Assignee:
                simon.brandhof Simon Brandhof
                Reporter:
                nicolas.bontoux Nicolas Bontoux
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: