Skip to content

docker push through nginx reverse proxy fails due to entity size

Ramkumar edited this page May 27, 2022 · 2 revisions

++docker push through nginx rev proxy fails++413 Request Entity Too Large++nginx error++docker push fails++

While pushing a Docker image of size 900+ MB, getting the below error and the file is not uploaded to Nexus repo.

error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body>\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.18.0 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n"

Solution:

Add or update "client_max_body_size". Default value if not set to this is 1 MB only. The parameter is to be added in the Docker's configuration section also.

e.g client_max_body_size 2048m;

Added "client_max_body_size 2048m;" to the configuration "/v2" in nginx config file.

Clone this wiki locally