Forums

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

Container 'Build' exceeded memory limit. NodeJS.

Aidan
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 25, 2020

Local ng test is fine (runs in about 30 secs).

I've tried expanding the docker memory to 3072 but that didn't work.

 

Project is NodeJS, trying to test using Karma and ChromeHeadless.

Already using flags: ['--no-sandbox''--disable-gpu']

 

Rerunning the last working pipeline also fails now.

 

My pipelines YML for reference:


imagenode:10.15.3

pipelines:
  default:
    - step:
        nameBuild and Test
        caches:
          - node
        script:
          - apt-get update && apt-get install -yq libgconf-2-4
          - >
            apt-get update && apt-get install -y wget --no-install-recommends && \
              wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -  && \
              sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \              apt-get update && \
              apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont --no-install-recommends
          - npm install
          - npm test
        artifacts:
          - dist/** 

 

1 answer

1 accepted

4 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2020

Hi Aidan,

I see in the pipelines yml file you attached here that you are not using any services. In this case, each step has 4096 MB of memory in total. I'm not sure where you set the memory to 3072?

If the build needs more than 4GB of memory to run, then the suggestion I can make would be to use size: 2x for the step (you can check here the documentation: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/). With this option, the build will have double the resources available (so 8 GB of memory), but it will also consume twice the number of build minutes.

You mentioned that the build was working before. I have seen a similar issue reported recently, where the builds started failing due to memory issues when HeadlessChrome 88.0.4298 was used, while previous builds, using HeadlessChrome 88.0.4292, were successful. Could this be the case with your builds as well?

Kind regards,
Theodora

Aidan
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 26, 2020

Hi Theodora,

I did add a service in to adjust the step memory but removed it again when it did not work. Trying size: 2x also did not work.

Definitely seems to be an issue with the latest unstable HeadlessChrome release. Switching over to stable has fixed everything. Thanks for the tip!

Like # people like this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2020

You're welcome @Aidan , good to hear this helped resolve the issue!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events