Context deadline exceeded after 1 hour - Build timed out (Free tier only)

For users on the Free plan, you will notice that your build timed out if it has taken more than 1 hour.

On the build page itself, you may notice the following output:

Upgrade your pricing plan to take advantage of longer build times

context deadline exceeded


Here is a screenshot of the mentioned output.

Screen_Shot_2021-11-24_at_17.44.03.png

 

This is part of an update to our new pricing plans. In particular, builds on the Free plan are limited to a maximum duration of 1 hour.

As suggested from the output, you can upgrade your plan to take advantage of the longer build durations afforded, amongst other improvements. 

Alternatively, if you would like to continue on the Free plan, one potential strategy to ensure your builds complete within the 1 hour duration would be to switch to a larger resource class (the `large` resource class is available for both Docker and Machine executors on the Free plan, for instance).

It will provide the build with access to more resources (additional CPU and memory), which can help improve the build duration.

More information about resource classes can be found here: https://circleci.com/docs/2.0/executor-types/#available-docker-resource-classes

To upgrade your build to use the large resource class you can add: resource_class: large an example of this can be seen below:

Current:

    docker:
     - image: ubuntu:bionic

Proposed:

    docker:
      - image: ubuntu:bionic
   resource_class: large

Additional information about our plans and available resource classes can be found on our pricing page here.

In addition, another strategy to improve build duration is to utilize parallelism. This is especially helpful if the build in question is about running tests.

A example of implementing this can be found below:

Current:

    docker:
     - image: ubuntu:bionic

Proposed:

    docker:
      - image: ubuntu:bionic
   parallelism: 4

 

Please check out our official documentation on setting up parallelism for tests here: https://circleci.com/docs/2.0/parallelism-faster-jobs/

For more optimization tips in general, we have some additional details at the following blog post: https://circleci.com/blog/six-optimization-tips-for-your-config/


If you are still facing timeout issues after implementing the above suggestion, please 
raise a support ticket with the CircleCI support team.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.