Hey Krunal,
Welcome to the Bitbucket Cloud community!
I would suggest including the following line of code in your bitbucket-pipelines.yml file to the affected step - this will allow you to determine which part of the step is exceeding the build memory limit:
- 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 30; done &
Cheers!
- Ben (Bitbucket Cloud Support)
I'm getting issue on below step
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Krunal,
You would put it in the "script" section at the top :)
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey i was update my pipeline with your suggestion but it happen every some time period what is the reason for that what i change for that?
again I'm getting this "Container 'Build' exceeded memory limit." error.
my pipeline code is below and i'm gettin memory lint error in last step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Krunal,
I've noticed based on your yml config that you've assigned 10240 to the docker-with-large-memory service container.
Pipelines builds have a maximum of 8GB to assign memory for when using the "size: 2x" build step - so the above definition will cause the build to fail automatically as it exceeds the maximum limit.
The 8GB of memory consists of 1GB for the build container, so realistically you only have 7GB total remaining - when you factor in the docker service containers - whichever container is being used is subtracted from this 7GB pool.
This means if you were to have a build step using the docker-with-more-memory service container for example - the remaining memory used by the step container would only be 3GB (8GB - 1GB build container - 4GB service container = 3GB remaining).
I would highly suggest reading through our documentation related to Pipelines, and if you need more than 8GB I would suggest making use of self-hosted runners:
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Krunal Pandav I usually define services first and this is what I would recommend. Your issue relates to the assigned memory, however - as per my previous reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.