IBM Cloud Docs
Build fails when the ephemeral storage limit is exceeded

Build fails when the ephemeral storage limit is exceeded

After you create and run a build, your build does not complete successfully and you receive a message that the ephemeral storage usage exceeds limits.

If you receive a message that the ephemeral storage limit is exceeded, then your build size is too small.

When a build runs, it needs to load the source code. When you use a Docker build, the base image needs to be downloaded and the necessary steps to build the target image need to be performed. The build run needs disk space for these steps, which is released after the build run is finished. This disk space is called ephemeral local storage. Depending on whether you choose a small, medium, large, xlarge, or xxlarge size for your build, a maximum amount of ephemeral storage is available to a build run. For more information about build size, see Determine the size of the build. When the maximum ephemeral storage is reached, the build run is stopped with an error message; for example,

Example error messages

Summary: Failed to run build due to exceeded ephemeral storage
Reason:  Pod ephemeral local storage usage exceeds the total limit of containers <AMOUNT>.
Summary: Failed to run build due to exceeded ephemeral storage
Reason:  Container <STEP_NAME> exceeded its local ephemeral storage limit <AMOUNT>.

Try one of these solutions.

Whether you are running your build in the console or in the CLI, use the CLI for troubleshooting problems with your build.

  1. Run the ibmcloud ce buildrun get --name BUILDRUN_NAME command to display the details of your build run.
  2. Review the Reason in the command output.

To resolve this problem, use a larger size for the build.

A larger build size also means that more memory and CPU cores are assigned to the build runs. Increasing this size will probably speed up the build runs, but also increases their cost.

For more information about build sizes, see Determining build sizes.

  1. Use the ibmcloud ce build update command to update the build configuration to use a larger size; for example,

    ibmcloud ce build update --name <BUILD_NAME> --size <SIZE>
    
  2. Use the ibmcloud ce buildrun submit command to submit a new build run. For the buildrun submit command, you must specify the --build option to provide the name of your build configuration. You can optionally specify the --name option to provide the name for this build run. If you specify the --name option, make sure that you use a different build run name from the failed build run, or ensure that you delete the failed build run by using the ibmcloud ce buildrun delete command. For example,

    ibmcloud ce buildrun submit --build <BUILD_NAME> --name <BUILDRUN_NAME>