-
Notifications
You must be signed in to change notification settings - Fork 610
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
503 on publishing a crate #10098
Comments
hmmmmmmm...... interesting..... according to our server logs we replied with "413 Payload Too Large", but apparently Heroku turned that into a "503 Service Unavailable"? 🤔 to fix the immediate issue: run in the meantime I'll try to find out why this is turning into a 503 error |
I encountered the same issue. After running cargo package, I found that the generated .crate file was only 23KB. However, I am still unable to upload it.
Here is my repository: https://github.com/liulifox233/ramdl |
yeah, I'm currently checking this on our staging environment, and it seems that currently all error responses from our API are turned into 500 or 503 errors for some reason. in other words: this is not just about the upload size, though in @alexjg's case it was. |
Yeah in my case I had accidentally included a bunch of build output from some tests in the crate, fixing that has allowed me to publish the crate. |
I'm expecting #10069 to be the cause of these symptoms, but it seems like the root cause is a limitation in CloudFront and/or Heroku. On our staging environment I get a "500 Internal Server Error" response from CloudFront instead of the 503 above. The difference there being that the staging environment uses the "Heroku Router 2.0" already, while the production environment does not. When I disable that "Heroku Router 2.0" feature I get the same 503 Heroku error as above. In other words: it looks like "Heroku Router 2.0" fixed the issue on the Heroku side, but there still remains a problem on the CloudFront side. |
I'm deploying the workaround to staging right now and will enable it on production too. This should be "fixed" within the next hour. Sorry for the inconvenience! |
Thanks for the quick response! |
The workaround is now deployed to production too |
Is it possible that this could be an issue related to the axum side, similar to this tokio-rs/axum#2850? |
yeah, aside from this using multipart uploads this sounds very similar. the linked stackoverflow issue makes it sound like this is not an axum-specific issue though. the open browser bug reports indicate that this is easier to support with Http 2, which might explain why upgrading the heroku router fixed it on that side. unfortunately that still leaves us with cloudfront seemingly not supporting this properly. |
I was wondering if |
that might be an option but we would have to do so in every single error case that we return, potentially including the ones from middlewares. and I think read_to_end() requires a buffer, but we should probably just discard the data without buffering it. I plan on adjusting our smoke test today to check for auth failure in the upload path, which should have caught the problem early. I'll also try out whether cargo can handle early responses by going around cloudfront. if cargo can't handle it then we're out of luck anyway, but from what I've read on the linked issue curl handles this correctly and AFAIU cargo uses curl by default. |
I've tested this down to cargo 1.49, since earlier versions showed "target 'aarch64-apple-darwin' not found in channel" errors when I tried to install them on my system. On all versions I've tested it worked fine once Cloudfront was out of the way... |
Current Behavior
I'm running
cargo publish
from within the crate I'm trying to publish (automerge_repo_rs
) and I consistently get a503
back from crates.io. I've tried refreshing my API token just in case that's the issue to no avail.Here's an example response:
Expected Behavior
I expect
cargo publish
to successfully publish the crate to crates.io.Steps To Reproduce
Obviously this will only work for me, but the steps I take are:
git checkout v0.2.0
cargo publish
Environment
rustup show
Anything else?
No response
The text was updated successfully, but these errors were encountered: