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.

Example of the issue

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

Try out a larger resource class or running tests in parallel to speed up job execution. Upgrade your pricing plan to take advantage of longer max job runtimes.

context deadline exceeded

Here is a screenshot of the mentioned output.




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 are completed 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:

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


     - image: ubuntu:bionic


      - 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.

An example of implementing this can be found below:


     - image: ubuntu:bionic


      - image: ubuntu:bionic
   parallelism: 4


Please check out our official documentation on setting up parallelism for tests here:

For more optimization tips in general, we have some additional details at the following blog post:

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?
3 out of 8 found this helpful



Article is closed for comments.