Issue
Over the past few weeks we have been seeing intermittent occurrences of the ProjectFileIndexer exception sure SonarQube analysis
##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
If I look closer at that the exception stack I can see at the bottom there is timeout
Caused by: java.lang.IllegalStateException: Fail to request url: https://sonarqube.mydomain.co.uk/batch/project.protobuf?key=mykey
Configuration
We are running our SonarQube 10.7 Dev instance on Azure as a Docker container
Note we also saw this issue when running 10.6
The instance contains around 1M LOC on a 2ML LOC license
- Azure Web App (Premium V3 P1V3 2vCPU & 8Gb)
- Azure SQL DB (Standard S2 50 DTU)
- Logs/Config/ES indexes on Azure Standard General Purpose V2) File storage
Analysis
Resources
I initially scaled the SQL instance from 20 DTU to 50 DTU, this made no difference to the problem
Deleting Elasticsearch Indexes
I stopped the container, deleted the Elasticsearch Indexes, restarted the container. The indexes rebuilt as expected in around 20 minutes, this made no difference to the problem
Trying to access to failing URL
I tried opening the URL https://sonarqube.mydomain.co.uk/batch/project.protobuf?key=mykey
in an SQ authenticated browser session.
- Usually it returned the expected file instantly.
- However from time to time, I could not spot a pattern, the URL timed out, took around 30 seconds
Question
The root of the issue I think is the intermittent failure of call to the SQ instance to get information required for the analysis.
The issue is I am not sure how to fix this, do I just throw more resources at it?
Can anyone suggest an approach, or better still a fix if you have seen the problem before?