Request Entity Too Large

Error Observed

12:44:33.190 INFO: ------------------------------------------------------------------------
12:44:33.190 INFO: ------------------------------------------------------------------------
12:44:33.190 INFO: Total time: 1:29.471s
12:44:33.318 INFO: Final Memory: 45M/2230M
12:44:33.318 INFO: ------------------------------------------------------------------------
12:44:33.318 ERROR: Error during SonarQube Scanner execution
12:44:33.318 ERROR: Failed to upload report - HTTP code 413: <html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Lar

Version - Server: Sonarqube in docker container
Version - Scanner: SonarQube Scanner
Version Java: Java 1.8.0_121 Oracle Corporation (64-bit)

I am trying to conduct an analysis on an application and received this error at the end of the execution.In the container, what would the path be to change the client_max_body_size value to 100M?

Apparently the server will reject requests by default if they are too large. This is difficult to deal with when you develop large applications.

I have searched around the server and I cannot find if it is using Apache or ngix, however the error is constant for either server. Other applications scan completely fine, while larger ones will encounter this error message during execution.

Scan an application with more than 6000 files and it will fail.

Add a way to change the client value size in the administration control plane (panel, page, etc).


Hi Amari,

nginx is not bundled with the SonarQube application, nor with the official Docker image. The limit you reach probably comes from a reverse-proxy specific to your infrastructure.

Could you please provide the size of the scanner report? It’s displayed in the logs just before the error you pasted in this thread.

hello how can i change the default size of report accepted, and what is the default value it’s 20 Mb?

@simon.brandhof: I am seeing same issue, unable to upload report to sonarqube
Analysis report generated in 160ms, dir size=2 MB
Analysis report compressed in 1056ms, zip size=1 MB
Failed to upload report - HTTP code 413:
2020-05-13T19:55:12.8046559Z [ERROR] 413 Request Entity Too Large
2020-05-13T19:55:12.8047081Z [ERROR]
2020-05-13T19:55:12.8056273Z [ERROR]

413 Request Entity Too Large

2020-05-13T19:55:12.8058319Z [ERROR] -> [Help 1]

Is there a way to update the size of analysis report accepted?

Hi @shruti_rao,

Pretty much universally when we see this error it comes from something in the middle between the machine where analysis takes place and the SonarQube server. E.G. a proxy.