amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

The build failed because the process exited too early.

Open Melanie-bit opened this issue 3 years ago • 1 comments

Before opening, please confirm:

App Id

arn:aws:amplify:us-east-2:186543383540:apps/d3pcsx5x6m4w70

Region

us-east-2

Amplify Hosting feature

Build settings

Describe the bug

There is a problem that occurs on a couple of mounts, at the begging everything works great but as time passed the project grew more and this was reflected on the build they began to take longer to do the deploy and now a days almost fails the deploy

we were identifed the posibilities on the logs: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory The prop value with an expression type of ChainExpression could not be resolved. Please file issue to get this fixed immediately. The build failed because the process exited too early. This probably means the system ran out of memory or someone called

so some times pass the changes when we reployed the commit , but but it almost fails.

So the soluctions that us made and works for few time it was to add on the enviroment varibles
NODE_OPTIONS=--max-old-space-size=4096

but it worked for a short time, we add for the build setting as well before the build the same : NODE_OPTIONS=--max-old-space-size=4096

Expected behavior

We excepet that the deploys pass, if take more time theres is no problem.

Reproduction steps

  1. we work on dev branches , so when we need to push somethig we have diferent enviroments on this case testing , we get all the changes to push to the branch , we make a push
  2. We see the steps of the deploy on the console
  3. if donsen't pass we check the log and if the log returns something related to The build failed because the process exited too early or FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory we reploy the commit on the console of aws-amplify and for the second attempt the change is raised.

Build Settings

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run --max_old_space_size=7168 build
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Additional information

log (10).txt

i'm going to attach the last log.

Melanie-bit avatar Aug 26 '22 18:08 Melanie-bit

There is a Build timeout setting in Amplify console, under Build setting -> Build image settings. Maybe try increasing that.

image

mahezsh avatar Aug 28 '22 08:08 mahezsh

Hi @Melanie-bit 👋🏽 apologies for the lack of activity on this issue. We are working on improving the team's visibility and response times. Upon further investigation it appears you are no longer running into this issue and your builds are successful. Please let us know if you need further assistance.

ghost avatar Oct 07 '22 20:10 ghost

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Mar 17 '23 20:03 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Mar 17 '23 21:03 github-actions[bot]