Container 'Build' exceeded memory limit.

김도희
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!
March 2, 2023

I Always got "Container 'Build' exceeded memory limit."

On logs:
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.

Any suggestion?


# bitbucket-pipelines.yml
image: node:16.15.0

# Workflow Configuration

options:
max-time: 30
size: 2x

definitions:
services:
docker:
memory: 512

pipelines:
branches:
dev:
- step:
name: Deploy to Development
deployment: Development
caches:
- node
script:
- echo $APP_NAME > env/.env
- echo $APP_NAME > env/.env
- ...
- export NODE_OPTIONS=--max_old_space_size=8192
- npm install
- npm test
- npm run build:dev
definitions:
caches:
node: src/node_modules

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2023

Hi @김도희

Welcome to the community.

Based on the max_old_space_size option, you're using 8192 or 8 GB size for executing NPM.
I'm suspecting 8 GB for a specific process is quite a bit high.

Would it be possible for you to try to use 1024 (1 GB) instead?

export NODE_OPTIONS=--max_old_space_size=1024

Let me know how it goes.

Regards,
Mark C

Suggest an answer

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

Atlassian Community Events