Overview
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.
Solutions
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: 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.
An 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 reach out to our Community Forum.
Comments
Article is closed for comments.