We are facing the above error (Mentioned in the title) while running the bitbucket yml file. We have tried substituting the value by taking https://community.atlassian.com/t5/Bitbucket-questions/Pipelines-Exceeded-Memory-Limit-Container-exceeded-memory-limit/qaq-p/1040776 as reference but still landed up with the same error.
Can someone mentioned what needs to be updated here?
Bitbucket-pipelines.yml file:
image: atlassian/default-image:2
clone:depth: full
definitions:caches:sonar: ~/.sonar/cachesteps:- step: &sonarcloudname: Analyze on SonarCloudcaches:- sonarscript:- pipe: sonarsource/sonarcloud-scan:0.1.5variables:SONAR_TOKEN: ${SONAR_TOKEN}pipelines:branches:'*':- step: *sonarcloud
Try to use newer version of the pipe, the one that you are using (0.1.5) is really old.The current version is 1.0.1.
If that doesn't work, you will need to experiment with the docker memory settings and/or with the node size.See https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html
Try overriding the size for the single step that is failing:
- step: size: 2x # Double resources available for this step.
or
<span>definitions:</span> <span> services:</span> <span> docker:</span> <span> memory:</span> <span>2048</span>
This seems to be an overwhelming recommendation, yet it does not work for me. I'm still running out of docker memory: "Container 'docker' exceeded memory limit."
Any other thoughts. This is happening for me when scanning a fairly large Angular project.
Hello Team,
Facing the issue container 'docker' exceeded memory limit in Bitbucket pipeline even after mentioning size 2x for Sonarscan. We are using Bitbucket runners.
- step: &sonarscan name: SonarCloud Scan size: 2x caches: - sonar
Step size limit is set to 4096MB for small steps and for large steps 8192MB
Also, tried by increasing the docker service limit as below
definitions: services: docker: memory: 3072
And we have the limitation that we can't increase the memory above 3072.
Can anyone please help us with this.
Thanks in Advance!!
It looks like you're new here. Sign in or register to get started.