error `413 request entity too large` while pushing an image

See original GitHub issue

I am getting an error while pushing to ttl.sh, 413 request entity too large. https://github.com/waveywaves/backstage/actions/runs/3103852916/jobs/5027642820#step:16:661

Based on the docker documentation I understand that the following configuration is necessary to get around this issue https://docs.docker.com/registry/recipes/nginx/#setting-things-up

# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
z4cecommented, Sep 30, 2022

I submitted a PR to fix this in the upstream buildx uses: https://github.com/containerd/containerd/pull/7459

2reactions
z4cecommented, Sep 30, 2022

Hi @kaovilai I spoke with @waveywaves on Kubernetes slack. I believe this because the buildx plugin is using the the push driver from containerd which apparently does not support transfer-encoding: chunked see: https://github.com/containerd/containerd/blob/main/remotes/docker/pusher.go#L265

The best workaround for now is just to use regular docker push instead of using buildx to push your image. I do see some other code in the buildx code for using a moby driver which might as well, but I’m not sure how to enable it through the github action.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker push error "413 Request Entity Too Large"
When I push the image to registy, it error out 413 Request Entity Too Large . I have modify the client_max_body_size as 20MB...
Read more >
Fixing 413 Request Entity Too Large Errors - KeyCDN Support
A 413 Request Entity Too Large error occurs when a request made from a client is too large to be processed by the...
Read more >
Push to harbor fails with "413 Request Entity Too Large" #634
The harbor domain was proxied through Cloudflare, disabling it finally let the action push the image successfully. I guess it make sense for...
Read more >
How Do I Solve "Request Entity Too Large" response? - JFrog
If receiving this error, this indicates that either nginx or httpd (or another reverse proxy) is being used which is limiting the size...
Read more >
How to Solve the "413 Request Entity Too Large" Error - Kinsta
In short, this increases the maximum file size of posts and uploads while boosting the time the server will spend trying to process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found