# Error Command failed with exit code 137. (https://ntl.fyi/exit-code-137)

**URL:** <https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700>\
**Category:** Support\
**Tags:** building, deployment\
**Created:** [January 8, 2023, 3:25am UTC](https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700 "2023-01-08T03:25:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnuragRamdasan](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/anuragramdasan/32/44242_2.png) [@AnuragRamdasan](https://answers.netlify.com/u/AnuragRamdasan)\
**Post date:** [January 8, 2023, 3:25am UTC](https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700/1 "2023-01-08T03:25:39Z")

</div>

Hi - out of nowhere my builds have now started failing. The error message also doesn’t describe much besides the fact that the command exited with error.

Any help on how to debug this would be appreciated. Right now I don’t think I am even able to find a starting point.

 ![Screenshot 2023-01-08 at 8.51.14 AM](https://global.discourse-cdn.com/netlify/original/3X/2/7/274f9fbfcd57e2c4eddea9859a7576fe23912799.png)

---

<div class="post-metadata">

**Author:** ![nathanmartin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nathanmartin/32/30845_2.png) [@nathanmartin](https://answers.netlify.com/u/nathanmartin)\
**Post date:** [January 8, 2023, 5:54am UTC](https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700/2 "2023-01-08T05:54:08Z")

</div>

@AnuragRamdasan Are you able to show the full build log?

You can also try [searching the forum for code 137](https://answers.netlify.com/search?q=code%20137) and see what caused it for others, and how they resolved it.

---

<div class="post-metadata">

**Author:** ![AnuragRamdasan](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/anuragramdasan/32/44242_2.png) [@AnuragRamdasan](https://answers.netlify.com/u/AnuragRamdasan)\
**Post date:** [January 8, 2023, 6:39am UTC](https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700/3 "2023-01-08T06:39:48Z")

</div>

here’s the entire error log

9:12:26 PM: Killed  
9:12:26 PM: error Command failed with exit code 137. ([Search results for '"non-zero exit code: 137"' - Netlify Support Forums](https://ntl.fyi/exit-code-137))  
9:12:26 PM: info Visit [yarn run | Yarn](https://yarnpkg.com/en/docs/cli/run) for documentation about this command.  
9:12:27 PM: ​  
9:12:27 PM: “build.command” failed  
9:12:27 PM: ────────────────────────────────────────────────────────────────  
9:12:27 PM: ​  
9:12:27 PM: Error message  
9:12:27 PM: Command failed with exit code 137: yarn build ([Search results for '"non-zero exit code: 137"' - Netlify Support Forums](https://ntl.fyi/exit-code-137))  
9:12:27 PM: ​  
9:12:27 PM: Error location  
9:12:27 PM: In Build command from Netlify app:  
9:12:27 PM: yarn build  
9:12:27 PM: ​  
9:12:27 PM: Resolved config  
9:12:27 PM: build:  
9:12:27 PM: command: yarn build  
9:12:27 PM: commandOrigin: ui  
9:12:27 PM: environment:  
9:12:27 PM: - NETLIFY\_GRAPH\_TOKEN  
9:12:27 PM: - NODE\_VERSION  
9:12:27 PM: - NPM\_VERSION  
9:12:27 PM: - ONEGRAPH\_AUTHLIFY\_TOKEN  
9:12:27 PM: - NEXT\_PRIVATE\_TARGET  
9:12:27 PM: publish: /opt/build/repo/.next  
9:12:27 PM: publishOrigin: ui  
9:12:27 PM: plugins:  
9:12:27 PM: - inputs: {}  
9:12:27 PM: origin: ui  
9:12:27 PM: package: ‘@netlify/plugin-nextjs’  
9:12:27 PM: - inputs: {}  
9:12:27 PM: origin: ui  
9:12:27 PM: package: ‘@netlify/plugin-lighthouse’  
9:12:28 PM: Caching artifacts  
9:12:28 PM: Started saving node modules  
9:12:28 PM: Finished saving node modules  
9:12:28 PM: Started saving build plugins  
9:12:28 PM: Finished saving build plugins  
9:12:28 PM: Started saving yarn cache  
9:13:03 PM: Finished saving yarn cache  
9:13:03 PM: Started saving pip cache  
9:13:03 PM: Finished saving pip cache  
9:13:03 PM: Started saving emacs cask dependencies  
9:13:03 PM: Finished saving emacs cask dependencies  
9:13:03 PM: Started saving maven dependencies  
9:13:03 PM: Finished saving maven dependencies  
9:13:03 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 ([Search results for '"non-zero exit code: 2"' - Netlify Support Forums](https://ntl.fyi/exit-code-2))  
9:13:03 PM: Started saving boot dependencies  
9:13:03 PM: Finished saving boot dependencies  
9:13:03 PM: Started saving rust rustup cache  
9:13:03 PM: Finished saving rust rustup cache  
9:13:03 PM: Started saving go dependencies  
9:13:03 PM: Finished saving go dependencies  
9:13:03 PM: Build failed due to a user error: Build script returned non-zero exit code: 2  
9:13:03 PM: Failing build: Failed to build site  
9:13:03 PM: Finished processing build request in 7m1.092874116s

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [January 8, 2023, 7:37am UTC](https://answers.netlify.com/t/error-command-failed-with-exit-code-137-https-ntl-fyi-exit-code-137/82700/4 "2023-01-08T07:37:55Z")

</div>

That’s still not the entire log. However,

> [@AnuragRamdasan](#):
>
> 9:12:26 PM: Killed

that line is the problem. It means, your build container ran out of memory and system forcefully killed the process.

On Starter accounts, you get 8 GB memory and on other plans you get 11 GB +. If your website doesn’t build within these limits, it would fail.
