If your project is utilizing Workspaces, but you run into trouble when attaching the workspace later on in the workflow, you may have exceeded your memory limit.
Your error may look similar to below.
"Error applying workspace layer for job 5cb8xxxx-xxxx-4499-9xxxx-1aaa2943xxxx:
Error extracting tarball /tmp/workspace-layer-5cb8xxxx-xxxx-4499-9xxx-1aaa2943xxxxx04313xx:
In this particular error, we can clearly see the process was gracefully killed with the `signal: killed` message. This is a guaranteed message that your job has exceeded its memory resource limits. Your error may or may not contain this message but have failed anyway in a similar way.
You can follow the instructions in this article to record the max memory usage of your job.
You can also view the "Resource" tab on your docker jobs to view memory usage.
Options to resolve:
- Reduce tarball size. The larger the tarball, the more memory will be utilized while decompressing. If your workspace's physical size is near or over your container's memory limit (4gb by default), you can exceed it easily, especially if you have one or more databases also running.
- Visit our docs to inquire about upgrading your job's resource limits via the `resource_class` key in your config.yml. Free plans can use up-to large, while performance and scale can access higher. More information here: https://circleci.com/product/features/resource-classes/