I am geeting
Container 'Build' exceeded memory limit.
I added size 2x also same error..
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.