4

I have a Jenkins server trying to pull a large (1.7GB) Git repository. The users of the repository have done naughty things, like putting big tar files in it as well as copies of other Git repositories. Jenkins never finishes its "branch indexing" task for the repository. Looking at the repo on disk, it fills up with large tmp_pack files in $JENKINS_HOME/caches/git-XXX/.git/objects/pack/. If I check out the repo myself, it's 1.7GB; but Jenkins' copy is 140GB because of all these tmp_pack files.

Edit: I should have mentioned more about my environment. I'm running Jenkins inside Kubernetes, using the Kubernetes plugin to spawn pods as Jenkins slaves. The master Jenkins runs in a pod with a Persistent Volume on NFS. And I'm using Jenkins' Multibranch Pipeline, so all the logic is in Jenkinsfile in the root of the repo.

Chris Jones
  • 4,815
  • 6
  • 34
  • 28

1 Answers1

5

I found the problem for my case. Jenkins has a global Git timeout of 10 minutes, but my repository takes more than 10 minutes to clone. JENKINS-20387 has instructions for changing the timeout. You set JAVA_OPTS=-Dorg.jenkinsci.plugins.gitclient.Git.timeOut=60. In my case, I had to also change it for the pod configuration for the slaves.

Chris Jones
  • 4,815
  • 6
  • 34
  • 28
  • I should mention the tmp_pack files appear to be the result of partial clones that were interrupted when they hit the 10 minute timeout. – Chris Jones Dec 02 '16 at 20:26