Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPError: 413 Request Entity Too Large from https://pypi.org/legacy/ #17076

Closed
andife opened this issue Nov 13, 2024 · 7 comments
Closed

HTTPError: 413 Request Entity Too Large from https://pypi.org/legacy/ #17076

andife opened this issue Nov 13, 2024 · 7 comments

Comments

@andife
Copy link

andife commented Nov 13, 2024

Describe the bug
Trying to publish wheels to pypi results in the error "HTTPError: 413 Request Entity Too Large

The original issue can be found at

pypa/gh-action-pypi-publish#285

Expected behavior

it should work

To Reproduce

Currently, an automatic publish attempt runs weekly via schedule, but if the following PR (onnx/onnx#6540) is merged, it can also be triggered manually

My Platform

Additional context

@ewdurbin
Copy link
Member

How large is the wheel that you're attempting to upload? PyPI has a request size limit of 1 GiB enforced by the load balancer, which cannot be raised.

@andife
Copy link
Author

andife commented Nov 13, 2024

I assume that I have approx. 30 wheels of approx. 14 mb each + one sdist. I think that should be well under 1GB. With test.pypi the upload works without problems

The error message:

INFO     username set by command options                                        
INFO     password set by command options                                        
INFO     username: __token__                                                    
INFO     password: <hidden>                                                     
Uploading onnx_weekly-1.18.0.dev20241111-cp310-cp310-macosx_12_0_universal2.whl
INFO     Response from https://pypi.org/legacy/:                                
         413 Request Entity Too Large                                           
INFO     <html>                                                                 
         <head><title>413 Request Entity Too Large</title></head>               
         <body>                                                                 
         <center><h1>413 Request Entity Too Large</h1></center>                 
         <hr><center>nginx</center>                                             
         </body>                                                                
         </html>                                                                
                                                                                
ERROR    HTTPError: 413 Request Entity Too Large from https://pypi.org/legacy/  
         Request Entity Too Large      

@ewdurbin
Copy link
Member

Is the file onnx_weekly-1.18.0.dev20241111-cp310-cp310-macosx_12_0_universal2.whl available somewhere for inspection?

@ewdurbin
Copy link
Member

ewdurbin commented Nov 13, 2024

Hm, from logs, I see:

WARNING Only PyPI and TestPyPI support attestations; if you experience
failures, remove the --attestations flag and re-try this command

I'm curious what the result of that for debugging is. I wonder if the attestation part of the request is pushing it over the client body size limit of 1024M... somehow. (Edit: Not this, see below)

@ewdurbin
Copy link
Member

ah, another ?... the upload endpoint is https://upload.pypi.org/legacy and the error is being emitted from https://pypi.org/legacy

@ewdurbin
Copy link
Member

ewdurbin commented Nov 13, 2024

Yep, that's it.

onnx/onnx@3763953 is likely root cause.

The upload endpoint was coded as https://pypi.org/legacy (it should be https://upload.pypi.org/legacy) which has a much stricter body size limit, so the upload is bounced before warehouse gets a chance to say "hey this isn't the upload endpoint"

@ewdurbin ewdurbin removed requires triaging maintainers need to do initial inspection of issue bug 🐛 labels Nov 13, 2024
andife added a commit to onnx/onnx that referenced this issue Nov 13, 2024
pypi/warehouse#17076

Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
github-merge-queue bot pushed a commit to onnx/onnx that referenced this issue Nov 13, 2024
### Description
fix upload endpoint for pypi,
pypi/warehouse#17076

The upload endpoint was coded as https://pypi.org/legacy (it should be
https://upload.pypi.org/legacy) which has a much stricter body size
limit, so the upload is bounced before warehouse gets a chance to say
"hey this isn't the upload endpoint


### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->

Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
github-merge-queue bot pushed a commit to onnx/onnx that referenced this issue Nov 13, 2024
### Description
fix upload endpoint for pypi,
pypi/warehouse#17076

The upload endpoint was coded as https://pypi.org/legacy (it should be
https://upload.pypi.org/legacy) which has a much stricter body size
limit, so the upload is bounced before warehouse gets a chance to say
"hey this isn't the upload endpoint


### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->

Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants