Hi Daniel,
Thanks for responding so quickly. This is my first time seeking help from a community forum and I am indeed amazed to see the swift response. Please find the answers to your question below.
- The full log where the error is being shown. If this happens on the server side, then this should be the ce.log file. - I work for a client project and I am not allowed to share anything outside of my client network or in a public website. I know how you might be feeling now , but if there is anything you can tell me , that I can look in the log file I can get that for you.
- The sonar.ce.javaOpts, sonar.web.javaOpts and sonar.search.javaOpts settings you were initially using. - 1) sonar.web.javaOpts=-Xmx512m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError 2) sonar.ce.javaOpts=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError (-Xmx value was initially 512mb and we have changed to 1Gb which is working fine with earlier version of sonar-java plugin) 3) sonar.search.javaOpts - unfortunately i cannot find this configuration in the configuration properties file of sonarqube. Is there a recommended/standard vaue for this option ?
- The size in lines of code of the project you are scanning. - 315K lines of code. yes to some extent our project is considered to be a big
- Is your server machine exclusively dedicated to SonarQube, or is it running other potentially memory-hungry processes (e.g. database etc). Are you launching the scan from a separate machine? Our server runs Sonarqube server , opensource jenkins and during analysis I cannot see any drop in memory and availalbe memory is in the range of 4 - 7 GB.
And yes we have our scanner binary placed in another machine in which we are running our Jenkins build pipeline and triggering the sonar analysis as part of the pipeline. This pipeline has different stages and before the pipeline starts there is a free memory of 21GB and when the build stage completes the available free memory is 12GB and when the sonar analysis starts and executes it further drops to 4GB or so and as said earlier during the scanning of java files in the bigger module memory issue is observed. If I exclude that particular java file and start the analysis it is stuck in the subsequent file of same module with same memory issue. At that point of time where the issue occurs, the free memory is close to 2GB.
All the servers that we are using are linux servers.
I hope I have given almost all the details , Please let me know if you need any further details