Maximum build time for builds

circle.yml
config
cci-20

#1

I tried to run endless loop on CircleCI 2.0 just to see how long the build could be run. My build was killed after 5h with message: Build was timedout after 5h0m0s

I’m trying to figure out if we can run very-long (don’t ask) builds on CircleCI. We currently have those running in Jenkins so it would be nice if those could be moved to CircleCI.

Previously on 1.0 there was a hard limit of 30 minutes for build, however I cannot find it mentioned anywhere in docs. I also could not find the 5h limit mentioned anywhere in docs. So I tried to measure that on 2.0.

There is one related setting: no_output_timeout on run which lets you specify timeout per command.

So a few questions:

  1. 5h is the current limit. Is it always 5h or it may be more / less in some cases? Can I assume at least 5h build times?
  2. Is there an option / configuration to change the maximum build time for 2.0 build
  3. Is there known workaround (like maybe using workflows for example)
  4. Is this a hard limit of 5h or it could be changed on request (asking support for example)

#2

For now, you could probably just use the timeout Unix command on the long-running part of your build:


#3

It’s not that I want to set some small timeout on some command. It’s that I want longer possible build time for builds. Currently there seems to be a limit on CircleCI that build should not take longer than 5h. If it takes longer - it gets killed.


#4

Yes, I understand the problem. My suggestion is based on the view that many build cases will comprise of a series of short steps and a very long one. The long one might be running some browser tests, or some other thing that takes a long time to run. Thus, for folks who would like this feature, prefixing their test call with the timeout feature will kill the test task if it takes longer than a specified timeout period.

However, that won’t be ideal for everyone, and I agree with your feature suggestion.


#5

I’m trying to figure out if we can run very-long (don’t ask) builds on CircleCI

This is a legitimate concern and requirement, building e.g GHC can take several hours.

I was under the impression that on 1.0 the 30min limit was applicable when there is a lack of output, and that it could be higher as long as there is output but I may be mistaken. Also, I don’t know if the timeouts are different between linux and macos images.

Anyway, all that to say is that I believe part of the feature request is that this area should be throughly documented.


#6