Build is failing for gatsby showing timeout without any error logs

  • My Site which is facing build failures moonlit-biscuit-0c9626.netlify.app (Netlify App)
  • Here is the buuld url

This is gatsby build and failing without any reason … Please help

8:05:19 PM: Killed
8:05:22 PM: ERROR: "build:app" exited with 137.
8:05:22 PM: ​
8:05:22 PM: "build.command" failed                                        
8:05:22 PM: ────────────────────────────────────────────────────────────────
8:05:22 PM: ​
8:05:22 PM:   Error message
8:05:22 PM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
8:05:22 PM: ​
8:05:22 PM:   Error location
8:05:22 PM:   In Build command from Netlify app:
8:05:22 PM:   npm run build
8:05:22 PM: ​
8:05:22 PM:   Resolved config
8:05:22 PM:   build:
8:05:22 PM:     command: npm run build
8:05:22 PM:     commandOrigin: ui
8:05:22 PM:     publish: /opt/build/repo/public
8:05:22 PM:     publishOrigin: ui

The better the post - the faster the answer.
Command failed with exit code 1: npm run build

There is a reason, and it’s even mentioned in log you’ve posted.

8:05:19 PM: Killed
8:05:22 PM: ERROR: “build:app” exited with 137.

^ That indicates that the build has run out of memory.

You can see the following support guides:
https://answers.netlify.com/t/support-guide-making-sure-your-builds-use-appropriate-resources-for-netlifys-build-system/5349
https://answers.netlify.com/t/support-guide-what-can-i-do-if-my-build-fails-for-memory-overallocation-related-errors/36549

For me it looks like you guys don’t have any solution …

@tkssharma I disagree.

The solution is to ensure that your project runs within the resources available to the build system.

How you do that is ultimately up to you, there are some tips mentioned in the threads that I linked previously, but build optimization is something that can be very project specific and nobody on Netlify’s side is going to adjust your build on your behalf.

The issue here is the …same site earlier used to build but now none of my builds passing, its fine if netlify wants me to pay for his services

1:12:45 PM: warning unable to find prism language “cmd” for highlighting. applying generic code block
1:12:56 PM: Killed
1:12:56 PM: ​
1:12:56 PM: “build.command” failed
1:12:56 PM: ────────────────────────────────────────────────────────────────
1:12:56 PM: ​
1:12:56 PM: Error message
1:12:56 PM: Command failed with exit code 137: npm run build (Search results for '"non-zero exit code: 137"' - Netlify Support Forums)
1:12:56 PM: ​
1:12:56 PM: Error location
1:12:56 PM: In Build command from Netlify app:
1:12:56 PM: npm run build
1:12:56 PM: ​
1:12:56 PM: Resolved config

@tkssharma I’m not too sure what you’re saying.

If you’re talking about plans, as far as I’m aware there is no difference in available build resources between a Starter plan and a Pro plan.

If you’re talking about paid support, I’m not aware of Netlify providing that either.

Note: I don’t work for Netlify, I can only point you to the resources that I already have.

Hi, @tkssharma. There are three possible solutions for this:

  • you profile your build locally to find the cause of the memory use and reduce it under 11 GB so builds at Netlify will succeed
  • you build locally or on some other system with more memory and then deploy to Netlify using manual deploys with the Netlify CLI
  • upgrade to the Enterprise plan and add the High-Performance Builds add-on to get more memory for your sites’ builds

Please let us know if there are questions about any of the solutions above. If you would like our account management team to contact you about upgrading please let us know. Please note, Enterprise starts around $5K per month.