-
Notifications
You must be signed in to change notification settings - Fork 4
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
用了镜像之后构建rustc报错 #294
Comments
I can confirm. This sometimes occurs, and I don't know why. You can wait for some time and this problem automatically disappears. Needs investigation. |
Nginx seems to fail to rewrite some urls. Although I haven't fully understood this problem, I have disabled some unnecessary URL rewrites, which possibly works around this problem. |
连续十几天这样了 频繁出现 几乎不可用 |
能贴一下复现方式和报错信息吗? |
报错:
复现: cargo new project
cd project
rustup override set nightly
echo 'actix-web = "*"' >> Cargo.toml
rm -rf ~/.cargo/registry/
cargo check |
我从一台国外的服务器和一台腾讯云机器上测试了都没有问题。请问访问 https://crates-io.proxy.ustclug.org/ 正常吗?下载包实际是从这个地址下载的。 |
访问是正常的,我感觉这问题跟并发有关,依赖少就正常,依赖多就出现这种情况 |
@taoky 已经确定是并发问题了,我用 |
那我改一下使用帮助吧……我不是 Rust 用户,也不清楚怎么修复访问的 host 变成了 |
可能是 http2 没配置好吧 |
但是也不应该访问 |
使用帮助 https://mirrors.ustc.edu.cn/help/crates.io-index.html 更新了。 |
Cargo 看到的是 302 到 https:///crates/ 了 [1],之前没查出来配置哪里有问题……看来没搞定,先 reopen 了 |
我找到这个问题的原因了,是因为我们的 nginx 会根据 client ip 对请求数作限制,默认是
即当上游返回 503 的时候,nginx 会让 client 302 到 目前我先对
同时调整了一下配置,减少了一次 302 跳转,@s977120 你现在可以试试看有没有问题。 不过感觉这个只是临时的 workaround,要彻底解决应该要让 cargo 限制一下并发请求数。 |
我今天看了一下 cargo 的代码:https://github.com/rust-lang/cargo/blob/master/src/cargo/core/package.rs#L415,其做 multiplexing 的时候会限制最大连接数为 2,nginx 这里也没有限制其他的东西,照理不应该出现问题。我本地 |
可以生成详细的网络请求日志。阅读日志后发现问题在 http2 的最大并发流数量中:
而这个数值在 |
重现:
报错
The text was updated successfully, but these errors were encountered: