Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build-timeout Plugin in Jenkins: how long is 'too long'?

I would like to take advantage of this plug-in but the 'Abort the build if it's stuck' option doesn't set any timer and the description of the plug-in doesn't say how long is the timer, it just says: 'This plugin allows you to automatically abort a build if it's taking too long'

My question is how long is that? 1 hour, less/more?
Can I set up my own time? Is that timer for the overall job or every line in the batch file has that timer?

like image 256
tony Avatar asked Oct 11 '13 15:10

tony


People also ask

Why Jenkins build taking too long?

Fortunately, the most common reasons your Jenkins instance is slow are easy to diagnose and correct: Non-performant plugins. Poorly tuned JVM arguments. Non-optimal garbage collection.

How do I increase Jenkins buildout timeout?

Go to Manage Jenkins and then Configure System . Under the item Global Build Time Out you can activate a global timeout which will be applied to any job. Choose your timeout strategy, the duration and add actions which should be executed at timeout.

What is the default timeout for Jenkins?

Its default time is 10 minutes.

How do I keep Jenkins build forever?

To manually prevent a build from getting purged according to the schedule, click on the 'Keep this build forever' button to lock the build.


1 Answers

Build-timeout plugin has multiple options (taken from help documentation of Build Timeout Plugin)

  • Absolute time. Use this if you know exactly how much time your build should not exceed in advance
  • Elastic time. Use this option if you want Jenkins to decide on the time. It basically averages out on the last n builds and will stop a build if it exceeds given percentage. If you do not know in advance how much time your build takes, use this option
  • Likely Stuck. Use Jenkins' Executor.html#isLikelyStuck() heuristics based approach to detect build is suspiciously taking for a long time

In your case, option two seems to be best initially.

like image 80
Shiva Kumar Avatar answered Nov 02 '22 23:11

Shiva Kumar