You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hey Vishal,
To calculate the memory being used on a per-step basis, you can add the following to the beginning of the step:
- 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 &
Once this has been added, you can check the build log and determine the amount of memory used - please see our article below for further troubleshooting steps related to pipelines (including the above specified):
https://confluence.atlassian.com/bbkb/troubleshooting-bitbucket-pipelines-1141505226.html
Cheers!
- Ben (Bitbucket Cloud Support)
Hi Ben, sorry I think I have put my question in the wrong way. I just wanted to ask when the npm run command executes for the "building the code" step how much maximum memory can be allocated to it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
The command provided is used to debug the memory that the build step is using so you can determine how much resources are needed.
You are correct in stating that by default the memory is 2048MB maximum, using the 2x flag as you have set increases this to 4096MB, I should have clarified this in my answer - my apologies.
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.