Build-timeout Plugin

Plugin Information

Plugin ID build-timeout
Latest Release 1.7-h-1
Latest Release Date Aug 28, 2012
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin allows you to automatically abort a build if it's taking too long. Once the timeout is reached, Hudson behaves as if an invisible hand has clicked the "abort build" button.

Because Java only allows threads to be interrupted at a set of fixed locations, depending on how a build hangs, the abort operation might not take effect. For example,
  • if Hudson is waiting for child processes to complete, it can abort right away.
  • if Hudson is stuck in an infinite loop, it can never be aborted.
  • if Hudson is doing a network or file I/O within the Java VM (such as lengthy file copy or SVN update), it cannot be aborted.

So if you think the build time out isn't taking effect, our default assumption is that the build is hanging at the place that cannot be interrupted. If you suspect otherwise, please obtain the thread dump and report it.

History

1.6 (2009-12-28)

  • Remove debug output
  • Update uses of deprecated APIs

1.5

  • Option to mark builds as failed or aborted.

1.4

  • The plugin now works with the native maven2 job type as well as the matrix job type.

Labels:

tier2-plugin tier2-plugin Delete
plugin-buildwrapper plugin-buildwrapper Delete
tier3-hudson-plugin tier3-hudson-plugin Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Aug 28, 2008

    Cees Bos says:

    A nice enhancement would be to send an email as well on abort. When a build take...

    A nice enhancement would be to send an email as well on abort. When a build takes more time then expected something is wrong, so an email would help. We have had a number of times that our build stuck and was aborted but no mail was send.

  2. Aug 20, 2009

    Mathias Ricken says:

    It would be nice to run a script before the build is aborted. I am running xvfb ...

    It would be nice to run a script before the build is aborted. I am running xvfb and would like to take a screenshot of it using xwd before the build is aborted.

  3. Apr 22, 2010

    Christopher Orr says:

    It would also be great to have an "automatic" option that times-out after 150% (...

    It would also be great to have an "automatic" option that times-out after 150% (configurable) of the usual build time (averaged from the last N successful builds) has elapsed.

  4. May 18, 2010

    Gary Pavek says:

    Regarding the first comment above, to send an email on abort. Sounds like a good...

    Regarding the first comment above, to send an email on abort. Sounds like a good idea. One of my build scripts sends its own email, but when Hudson aborted the build, I could not find out why.

    The solution I implemented was to add a lot of console output to my build script. Hudson traps the console output and stores it with the test history regardless of outcome. This makes it possible to diagnose failures even when my build script cannot send its own email. The only problem I had to deal with then was that Ruby was caching the $stdout. Fixed that when I found the .sync and .flush methods for an iostream." $stdout.sync = true" became my new best friend but flushing might be better in other circumstances.

  5. Dec 22, 2010

    Anthony Veckey says:

    I like the 'automatic' option described above.  It would also be helpful if...

    I like the 'automatic' option described above.  It would also be helpful if there was a global setting, so that you can set a default timeout for all jobs instead of only setting on a per-job basis (with the option of overwriting the default per job).

  6. Feb 24, 2011

    Ismael Angelo A. Casimpan Jr. says:

    The wiki does not say where to configure the build timeout. You can go to (obvi...

    The wiki does not say where to configure the build timeout.

    You can go to (obviously) configure and look for the "Abort the build if it's stuck" and configure the number of minutes the build will be aborted. In my case, what I did was to get the last 10 builds, get the peak build time and add 10 mins to it.