Heroku部署时出现错误。错误:RPC失败;HTTP 504 curl 22 请求的URL返回错误:504。

6

我以前在Heroku上通过HTTP传输方式部署时没有遇到过问题,但最近无法完成部署。

这是我收到的错误信息:

Enumerating objects: 58668, done.
Counting objects: 100% (57434/57434), done.
Delta compression using up to 16 threads
Compressing objects: 100% (16705/16705), done.
Writing objects: 100% (57124/57124), 50.77 MiB | 76.23 MiB/s, done.
Total 57124 (delta 44149), reused 52353 (delta 40249)
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly

我尝试过切换到SSH传输,它能工作,但是Heroku即将停用SSH传输,因此我需要解决这个错误。

我还尝试根据Atlassian的页面更改postBuffer,但我仍然遇到同样的错误。

git config --global http.postBuffer 157286400

有人知道如何解决这个问题吗?我在网上找到的资源非常少,而且也没有解决问题。


504是“网关超时”:某个中间人认为您花费的时间太长,因此切断了您的连接。您只有几个选择:加快速度——实际上可能不太可能——或者解决中间人的问题。找出这个中间人是谁。如果可能,完全移除他。如果不可能,请让他增加超时时间。 - torek
1个回答

9
我向Heroku提出了支持工单,回复是重置Git仓库。
heroku plugins:install heroku-repo
heroku repo:reset -a <app-name>

我这样做之后,部署过程中就没有出现任何问题。


这也给了我一个504错误。 - John R Perry
第一次运行 heroku repo:reset -a <app-name> 时,我得到了 `预期的响应应该是成功的,但得到了504a,然后我再次运行了它们,结果成功了。这是一个好的结果,但可能需要多次尝试。 - David Aldridge

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接