Disable proxy_request_buffering for git-receive-pack
On gitlab.com we were frequently running out of disk space on the git fleet due to large cache files in the nginx client_body_temp dir. After some investigation we disabled request buffering on the git fleet with the following config injected into the gitlab conf file:
location ~ (git-receive-pack$) { proxy_cache off; proxy_pass http://gitlab-workhorse; proxy_request_buffering off; }"`
See https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5732 for more detail.
In omnibus we already disable proxy_request_buffering with:
location ~ (\.git/gitlab-lfs/objects|\.git/info/lfs/objects/batch$) {
proxy_cache off;
proxy_pass http://gitlab-workhorse;
proxy_request_buffering off;
}
One option is to add \.git/git-receive-pack$|\.git/info/refs?service=git-receive-pack
to that regex to make this permanent with an omnibus update for these two types of requests:
<path>/<repo>.git/info/refs?service=git-receive-pack
<path>/<repo>.git/git-receive-pack
Related: #945 (closed)