Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

why container build excedded limit error coming during flutter build command on pipeline ?

Swapnil Agrawal
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!
October 13, 2022
image: cirrusci/flutter:2.2.1

pipelines:
branches:
# "Reaplace Branch name with start features/*"
'uat_release':
- step:
# services:
# - docker-with-large-memory
name: Running pub get
script:
# - docker info
# - flutter upgrade
- flutter pub get
# - flutter analyze
# - flutter test ./test
# - flutter create -t app ./
- step:
name: Build
size: 2x
script:
- flutter build appbundle --no-tree-shake-icons
- flutter build apk --split-per-abi --no-tree-shake-icons

 

 i changed service docker size to 3072

and without service of docker i used size in  build steps again i getting container build exceeded limit . how to resolve this problem 

 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2022

G'day Swapnil!

By default, the amount of memory which can be assigned to a build step is 4GB, using the "size: 2x" parameter increases this to 8GB.

To debug your build step, you can add the following command to the beginning of your build step - this will allow you to determine where the memory is being exceeded and make changes accordingly:

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

You can also debug your build locally with the above code added using Docker - this way you can determine if the same memory limit is being exceeded on your own infrastructure and confirm if the issue is pipelines-specific or not without using up more build minutes:

https://support.atlassian.com/bitbucket-cloud/docs/debug-pipelines-locally-with-docker/

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events