How to Know the Size of final Sonar Report that the Analyzer Sends to the SonarQube

We have a Gradle multi module project which is continuously get new features. As a result it source files are increased day by day. We have a SonarQube setup with an nginx proxy. Recently we are having an issue when analyzing the project which gives following error

* What went wrong:
  Execution failed for task ':sonarqube'.
 > Failed to upload report - HTTP code 413: <html>
 <head><title>413 Request Entity Too Large</title></head>
 <center><h1>413 Request Entity Too Large</h1></center>

We understand this is due to exceeding the maximum request body size allowed by nginx. And currently we have 30MB. To fix this we need to increase the limit. But it is better to know exact size of the request body so that we can decide the appropriate level. In the project’s workspace after running an analysis (it fails due to above reason) I couldn’t find any single file which could be the final report. I look at the build/sonar directory in the project’s root. Could I know if my assumption which is there should be a single report file that will be sent to the SonarQube. If it is true I want know where I can locate it. If my assumption is wrong is there an any way to know the size of the request body.

please note that I am unable to access nginx log.

Hey there.

If you move the log-level up to gradle sonarqube --info, you should find the information towards the end of the gradle logs.

Analysis report compressed in 16ms, zip size=30.4 kB
Analysis report uploaded in 725ms
ANALYSIS SUCCESSFUL, you can find the results at: http://localhost:9000/dashboard?id=sonarqube-scanner-gradle

In my scenario build failed before uploading the report. That is why I want to find the local location of the report.

This line should still be generated even with a failed upload.

Oh I missed it. Thanks a lot @Colin. This saved my day.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.