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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,646,751
Community Members
 
Community Events
196
Community Groups

Container 'docker' exceeded memory limit..

i m getting this error- Container 'docker' exceeded memory limit.
when i m trying to build
My .yml file is:-
image: # Choose an image matching your project needs

clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly

definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- sonar
script:
- # Build your project and run
- pipe: sonarsource/sonarcloud-scan:1.4.0
- step: &check-quality-gate-sonarcloud
name: Check the Quality Gate on SonarCloud
script:
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6

branches:
master:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
pull-requests:
'**':
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 10, 2022

Hi @Vikram Kumar,

In Pipelines builds, regular steps have 4096 MB of memory in total. The build container is given 1024 MB of the total memory.

Pipes use a Docker service, which has a default memory limit of 1024 MB. If the pipe needs more memory than that, I would suggest increasing that limit, you can do that in the definitions section of your bitbucket-pipelines.yml file. E.g. if you want to increase the memory of the Docker service to 2048 MB, you can use a definition as follows:

definitions:
services:
docker:
memory: 2048

This will allocate 2048 MB of memory to the Docker service. You can also try increasing it to more, if this is not enough, up to 3072 MB (since the build container is given 1024 MB of the total memory).

If the Docker service needs more than 3072 MB, then you can increase the total memory available to a step by using size: 2x for a step. This will give the step 8 GB of memory, and then the Docker service can be configured to use up to 7128 MB.

Please keep in mind that pipelines configured with 2x will use twice the number of build minutes.

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events