Exceeding 8MB Max Config Size
The maximum size of a CircleCI configuration file (config.yml) is 8MB. When this limit is exceeded, customers may see errors such as "Unexpected exception processing config" or "A compiled config YAML must be at most 8MB" or "Your compiled config is too large to be processed. Please contact support." in their build logs.
It is important to remember that this is the compiled configuration. This is the result of expanding any YAML anchors and aliases as well as importing all required/imported orbs' commands.
Update
As of November 2023, the limit was increased from 4MB to 8MB.
Troubleshooting oversize config files
To find out the size of the final compiled configuration, use the CircleCI CLI to process the original config. From here, you can inspect the compiled configuration file using the commands below:
circleci config process .circleci/config.yml > compiled.yml
ls -lH compiled.yml
Note: The command above will fail if your compiled YAML file exceeds the limit.
This is meant to help you figure out if your current config is nearing the limit.
Important
If you are evaluating the continued config file (as per Dynamic Configuration), please ensure you pass in the same pipeline parameter values to match the `parameters` values you are setting via the Continue Pipeline API.
circleci config process \
--pipeline-parameters '{"foo": "bar", "fizz": 123}' \
.circleci/continued.yml > compiled.yml
ls -lH compiled.yml
We have a collection of useful tips to potentially reduce the size of the compiled config file.
If you choose to move your commands into scripts, you could also utilize workspaces to copy external scripts between jobs, so you don't need to do a full checkout every time.
Comments
Article is closed for comments.