2 回答

TA貢獻1794條經驗 獲得超7個贊
Gitlab服務器環境是CentOS7+Gitlab7.2.1,最近發現在開發機上使用git pull更新文件時,會報如下錯誤。
fatal: The remote end hung up unexpectedlyfatal: early EOFfatal: unpack-objects failed
使用git clone重新checkout源也受到影響,長時間checkout不出來,
Google了半天也沒找到個好辦法,最后還是查錯誤日志定位到了問題
在/var/log/gitlab/unicorn/unicorn_stderr.log中,發現如下的錯誤信息
E, [2014-12-06T09:13:10.319216 #11074] ERROR -- : worker=0 PID:11091 timeout (31s > 30s), killingE, [2014-12-06T09:13:10.336186 #11074] ERROR -- : reaped #<Process::Status: pid 11091 SIGKILL (signal 9)> worker=0I, [2014-12-06T09:13:10.340379 #11183] INFO -- : worker=0 spawned pid=11183I, [2014-12-06T09:13:10.340848 #11183] INFO -- : worker=0 read
看來是被Ruby誤認為超時中斷了。解決辦法就是調大unicorn的timeout值。
修改/var/opt/gitlab/gitlab-rails/etc/unicorn.rb,將
# What the timeout for killing busy workers is, in secondstimeout 30
改為
# What the timeout for killing busy workers is, in secondstimeout 60
最后,運行
sudo systemctl restart gitlab-runsvdir.service
重啟Gitlab。
之后客戶端就可以正常Git pull或者clone了
添加回答
舉報