Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gitlab git lfs+;apache2,获得502“;AH01097:通过请求正文未能发送到127.0.0.1:8181“;推送文件时_Git_Apache_Gitlab_Git Lfs - Fatal编程技术网

gitlab git lfs+;apache2,获得502“;AH01097:通过请求正文未能发送到127.0.0.1:8181“;推送文件时

gitlab git lfs+;apache2,获得502“;AH01097:通过请求正文未能发送到127.0.0.1:8181“;推送文件时,git,apache,gitlab,git-lfs,Git,Apache,Gitlab,Git Lfs,我使用的是gitlab 11.1.4,它安装了omnibus包和apache2 一切正常,除了git lfs似乎超时 在客户端,我可以看到 bar/foo/lb/bar.cast (99%) Fatal error: Server error: https://gitlab.example.com/foo/whatever.git/gitlab-lfs/objects/777ed934b03ee88e4d6f25b16e79c1409030ece50d8ff751818f5f064149226c

我使用的是gitlab 11.1.4,它安装了omnibus包和apache2

一切正常,除了git lfs似乎超时

在客户端,我可以看到

bar/foo/lb/bar.cast (99%)
Fatal error: Server error: https://gitlab.example.com/foo/whatever.git/gitlab-lfs/objects/777ed934b03ee88e4d6f25b16e79c1409030ece50d8ff751818f5f064149226c/203686721 from HTTP 502                        
Uploading LFS objects:   0% (0/2), 0 B | 346 KB/s, done
Fatal error: Server error: https://gitlab.example.com/foo/whatever.git/gitlab-lfs/objects/c119f668d98e8f67acefeade50d7d89f50cfe0654bbe6775ad971d229f99612b/233214051 from HTTP 502
error: failed to push some refs to 'ssh://git@gitlab.example.com:8090/foo/whatever'
在apache2日志中我看到了

[Thu Aug 02 10:48:09.195315 2018] [proxy:error] [pid 23394] (104)Connection reset by peer: [client 195.68.4.138:57292] AH01084: pass request body failed to 127.0.0.1:8181 (127.0.0.1)
[Thu Aug 02 10:48:09.195340 2018] [proxy_http:error] [pid 23394] [client 195.68.4.138:57292] AH01097: pass request body failed to 127.0.0.1:8181 (127.0.0.1) from 195.68.4.138 ()
由于文件是40MB大,我怀疑是超时问题。(上传一个较小的文件给我一个422而不是502,但我认为这是因为这个bug:)

我试图在apache2配置中更改以下内容

超时2400 代理超时2400 ProxyBadHeader忽略

gitlab.rb
中,我放置了以下内容

gitlab_workhorse['proxy_headers_timeout'] = "20m0s"
unicorn['worker_timeout'] = 3600
gitlabctl重新启动

但仍然是502


我错过什么了吗

我遇到了一个类似的问题。lib/gitlab/lfs_token.rb中有一个固定超时设置为1800秒(30分钟)

我为此开了一张罚单

Gitlab已选择在lfs身份验证响应中实现“expires_in”属性,因此lfs知道在原始过期之前请求临时身份验证。我知道该修复程序针对的是v11.9。有关详细信息,请检查带有票据的合并请求

同时,每次升级后,我在lib/gitlab/lfs_token.rb中将默认的_EXPIRE_时间设置为18000,从而解决了这个问题