I am running sonarqube using gradle command ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url. I am getting error Failed to upload report - HTTP code 413. Request Entity Too Large. I am using sonarserver version : Community Edition Version 7.8. I am running sonar report using gradle command: ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url I am getting error Failed to upload report. Sonarqube server is on oracle cloud (oci) node and the report file size is 10M.
413 Request Entity Too Large
I got this when I was using the Nginx server for SonarQube.
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.
For Nginx servers
To allow the request size to be up to 20 megabytes, add the following line to your Nginx configuration file:
...
client_max_body_size 20M;
....
configuration files should be found in /etc/nginx/
directory
/etc/nginx/sites-enabled/
folderserver {...}
, http {...}
or, location{...}
block of the configuration file