Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Container 'Build' exceeded memory limit.

Dheeraj Varshney
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2023

I am geeting 

 

Container 'Build' exceeded memory limit.

 

I added size 2x also same error..

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2023

Hi Dheeraj, and welcome to the community.

You can add the following commands in your bitbucket-pipelines.yml file, at the beginning of the step that fails with memory issues:

- while true; do date && ps -aux && sleep 5 && echo ""; done &
- while true; do date && echo "Memory usage in megabytes:" && echo $((`cat /sys/fs/cgroup/memory/memory.memsw.usage_in_bytes | awk '{print $1}'`/1048576)) && echo "" && sleep 5; done &

These commands will print memory usage during the build and they can help you figure out which processes consume a lot of memory and see if you can configure them to use less.

The maximum memory that can be configured for a Pipelines build in our own infrastructure is 8GB with the size: 2x option.

If you cannot configure your build to use less memory than that, you can look into using Runners in one of your servers and run this step on a runner:

Runners allow you to run builds in Pipelines on your own infrastructure, and you won’t be charged for the build minutes used by your self-hosted runners. With a runner, it is possible to configure up to 32GB (8x) of memory to run your builds, if your server has that memory.

We have a feature request for the ability to increase the memory beyond 8GB for Pipelines builds that run in our infrastructure, you can vote for it to express your interest:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events