Docker Community Forums

Share and learn in the Docker community.

Automated build time limit

(Shaun Jackman) #1

I’ve had two jobs die due to a SIGKILL (sig 9, exit status 137) after exactly 4 hours. I’m guessing that this is a default time limit on automated build jobs. Am I right? Can that time limit be configured and extended?

I’m running it on a AWS EC2 t2.small instance, and if it runs out of CPU credits, the build can take a long time.


(Dlacewell) #2

Hello thanks for reaching out. Can you reply with your Docker user and the repository of interest?

(Shaun Jackman) #3
The builds of sjackman:ghc died after four hours. If it’s not a build timeout, then perhaps it’s exceeded the amount of available memory, and some other process, possibly the kernel OOM, is sending it a SIGKILL.

==> brew install --verbose --build-bottle ghc
ERROR: Build process returned exit code 137
builder-58280: Terminating...
builder-58280: Terminated
ERROR: Tests in 'sjackman:ghc' (1fe80949) failed in 4:00:33

(Shaun Jackman) #4

The user is LinuxbrewTestBot.

(Shaun Jackman) #5

I made sure that I had a full 4.8 hours of CPU credits banked with EC2 before I started a build, and the build completed successfully in three hours! So, is there a four hour time limit on Docker Cloud automated builds?

(Geoff Bowers) #6

What’s the business case for running a build on a T2.small? If any build takes us more than 10 minutes (including the time to allocate a build server) we consider it bad news.

Why not build the image locally and manually push to the registry?

(Pablo Chico de Guzman Huerta) #7

Hi Shaun,

Yes, there is a (probably non documented) limit of 4hours. I have created a feature request to allow customizable build timeouts, but it will take some time to be implemented.


(Shaun Jackman) #8

Four hours should be good enough in most cases. I just wanted to confirm the cause of the build failures. Thanks for looking into it, Pablo.

Geoff, Linuxbrew is an open-source project, and I’m paying the EC2 costs out of my pocket for now. Most software build in under ten minutes, but ghc and other compilers take hours to build. Perhaps I’ll look for a sponsor in the future.

(Pablo Chico de Guzman Huerta) #9

Just in case you don’t know it, you can now edit your autobuild configuration and run your builds in the Docker Cloud infrastructure, which uses larger instances and it is free while in beta.

(Shaun Jackman) #10

I didn’t know that. Thanks for the tip! I’ll try it out.

(Cmericli) #11

Having exactly the same issue with my automated build in In my case my build is inherently long (compiling Unreal Engine from source) so I really need to be able to customize my build timeouts. Any news on this by any chance?

(Metaa) #12

Hello everyone,

currently having the same problem. I’m trying to build an image for a Fuchsia OS environment (Google’s new OS) and that sadly takes longer than 4 hours. Although my server space is too low, so that kind of sucks :roll_eyes:

Any news here?