使用git(dokku)部署时出错 - 超时/断开的管道 [英] Error when deploying with git (dokku) - timeout / broken pipe
问题描述
我现在使用dokku和数字海洋已经有一段时间了,现在没有任何问题了。
使用以下命令部署到dokku时,我现在遇到了问题:
git remote add dokku dokku @ some-ip:myapp
git push dokku develop:master
我有以下问题:
计数对象:528,完成。
使用多达4个线程的增量压缩。
压缩对象:完成100%(509/509)。
packet_write_wait:连接到某个-ip端口22:损坏的管道
致命:远程端意外挂起
错误:未能将某些文件推送到'dokku @ some-ip:myapp'
我尝试
- set
ServerAliveInterval
用于ssh客户端
git config http.postBuffer 209715200
/git config ssh.postBuffer 209715200
但不起作用。我认为这是因为推送内容的大小有点高...
感谢您的帮助!
将postBuffer
选项设置为值<$ c之后 $ c> 209715200 ,我得到以下错误:
计数对象:528,done。
使用多达4个线程的增量压缩。
压缩对象:100%(353/353),完成。
超时,服务器some-ip没有响应.38.00 KiB / s
致命:远程端意外挂起
错误:未能将某些文件推送到'dokku @ some-ip:myapp'
上传之前最后一个进度提示挂起:
写作对象:87%(466/531),33.85 MiB | 120.00 KiB / s
解决方案
git config http.postBuffer 209715200 / git config ssh.postBuffer 209715200
只要您推送SSH(端口22),就不会有任何区别:
packet_write_wait:连接到某些-ip端口22:损坏的管道
与配置无关,但是由于网络连接不良/您与目标点之间的带宽较低,导致大尺寸数据包在tcp中断并丢失。
广泛讨论此处。尝试:
$ b 1)切换到http(由于头部开销小一些,这会增加制动的大小限制)
2)减少回购规模(repack或gc - aggressive)
然而,只有您正在接近它的边缘。如果您的连接非常糟糕,您不能实际传输大数据(也包含多个标头)数据包,那么这是唯一的解决方法:
增加您的带宽(切换到局域网,更改网络等)。
这可能是客户端和接收端的要求。I use dokku with digital ocean for a while now without any problem
I have a problem now when deploying to dokku leveraging the following command:
git remote add dokku dokku@some-ip:myapp git push dokku develop:master
I have the following problem:
Counting objects: 528, done. Delta compression using up to 4 threads. Compressing objects: 100% (509/509), done. packet_write_wait: Connection to some-ip port 22: Broken pipe fatal: The remote end hung up unexpectedly error: failed to push some refs to 'dokku@some-ip:myapp'
I try
- set
ServerAliveInterval
for the ssh client git config http.postBuffer 209715200
/git config ssh.postBuffer 209715200
but it doesn't work. I think it's because the size of the content to push is a bit high...
Thanks for your help!
Update
After set the postBuffer
option to the value 209715200
, I got the following error:
Counting objects: 528, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (353/353), done.
Timeout, server some-ip not responding.38.00 KiB/s
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'dokku@some-ip:myapp'
The last progress hint I have before the upload hangs is:
Writing objects: 87% (466/531), 33.85 MiB | 120.00 KiB/s
Firstly, this
git config http.postBuffer 209715200 / git config ssh.postBuffer 209715200
Won't make any difference, as long as you are pushing over SSH(port 22):
packet_write_wait: Connection to some-ip port 22: Broken pipe
Your error has nothing to do with configuration, but with bad internet connection/low bandwidth somewhere between you and destination point, which results in big size packets being broke in tcp and lost.
It's extensively discussed here. Try:
1) switching to http (this will increase size limit for brake due to a bit smaller header overhead)
2) decreasing repo size (repack or gc --aggressive)
However, this will work, only if you are on the verge of getting it there. If your connection is really bad you can't physically transfer big( also because containing multiple headers) packets of data, then the only fix:
Increase your bandwidth (switch to LAN, change network etc). It may be a requirement both on client and receiving end.
这篇关于使用git(dokku)部署时出错 - 超时/断开的管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!