Jenkins pipeline is failing with git timeout


Currently, I have one repository which is having 8GB files and in that repository, I have my Jenkins file too in the same repository. My Jenkins file is written in scripted not in declarative. and to clone this I need more than 10 minutes of time. So now I have configured a pipeline to get the Jenkins from this bit repository.

So under the pipeline section, I have selected the pipeline script from SCM and selected GIT, and given the URL and branch. Under additional behaviors, I have selected Advanced clone behaviors and selected fetch tags, and given a timeout for clone and fetch operations as 60 minutes. since my repository is really big and my network is also a bit slow I need more than the default 10 minutes time to get the code.

Now when I trigger the pipeline multiple times, it randomly fails and gives me the below error. When I check the failed build, all the failing builds are failing exactly at the 10th mint (cause it shows took 10 minutes) even though when I give it as 60 mints time.

Started by user Sarva
Rebuilds build #14
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress --prune -- origin +refs/heads/master:refs/remotes/origin/master" returned status code 1:
stderr: remote: Enumerating objects: 1           
remote: Enumerating objects: 228444           
remote: Enumerating objects: 2529222
Resolving deltas: 100% (4167016/4167016)
Resolving deltas: 100% (4167016/4167016), done.
error: rev-list died of signal 15
error: did not send all necessary objects

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(
	at jenkins.plugins.git.GitSCMFileSystem$
	at jenkins.scm.api.SCMFileSystem$
	at jenkins.scm.api.SCMFileSystem.of(
	at jenkins.scm.api.SCMFileSystem.of(
	at jenkins.scm.api.SCMFileSystem.of(
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(
	at hudson.model.ResourceController.execute(
Finished: FAILURE

So I would like to understand when the pipeline is trying to get the scripted Jenkins file from git, will it do git clone and fetch or it will do along with clone a checkout option too. cause when I am using scripted it’s not showing many logs before the stages.

Do you have the checkbox checked for Lightweight Checkout? If so, can you try unchecking it?

1 Like

Thank you for the help @slide_o_mix

After disabling Light Weight Checkout, now it’s using mentioned timeouts.

I have one more doubt,
If I enable 60 mints timeout for plugin level (with the below option) instead of pipeline level, Will lightweight checkout use 60 mints timeout.?


That I am not sure of. You could try it out and see.