Increase git daemon haproxy timeout

On a slow computer, this rune fails:

  git clone -q --mirror git://git.openstack.org/openstack/nova.git nova </dev/null >log 2>&1

Having straced and tcpdumped, what seems to happen is that the server
sends a list of all the refs and corresponding object ids.  Then the
client spends quite a while thinking.  Firstly the git client process
sits on the cpu for a while, and then it spends a while statting files
correspondong to the various objects.

This thinking takes much longer than is usually the case for `git
clone' because the nova.git repo contains so many refs (>100K refs).

I was only able to repro the problem on a somewhat overloaded VM, and
only with -q and redirecting output to files.  I conjecture that git
does something slightly different if it wants to print progess info.

(The practical problem for me is that this causes our git caching
proxy to be unable to clone nova.git.)

In my tests, the slow system took 2 mins 48 seconds between being told
the last ref, and coming back to start asking for objects.  This time
may well be significantly longer on an even slower computer.

I suggest setting the timeout to 15 minutes, which gives a factor of 5
safety margin over what I actually observed.

NB that I have not been able to actually test this change.

Change-Id: I0e6c00564fdc91dcd6933c17965c493553f8aea3
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
This commit is contained in:
Ian Jackson 2016-12-14 14:42:15 +00:00 committed by Clark Boylan
parent 4cd96a9809
commit f5f9e47e51

View File

@ -105,6 +105,10 @@ class openstack_project::git (
'option' => [
'tcplog',
],
'timeout' => [
'client 15m',
'server 15m',
],
},
}
haproxy::balancermember { 'balance_git_http_member':