# Rebuild fails with exit 1: ERR\_PNPM\_RECURSIVE\_EXEC\_FIRST\_FAIL

**URL:** https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862
**Category:** Support
**Created:** [February 12, 2025, 10:55am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862 "2025-02-12T10:55:44Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 12, 2025, 10:55am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/1 "2025-02-12T10:55:44Z")

</div>

This is all I found

```plaintext
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod

```

Ideas?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 12, 2025, 2:34pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/2 "2025-02-12T14:34:44Z")

</div>

It ran too long. Try increasing swap or ram.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 12, 2025, 2:43pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/3 "2025-02-12T14:43:15Z")

</div>

I’m a bit sceptical. 8 GB RAM, it dyed right away and something like this has never happened before. What can be changed so that that memory is not enough today, but was enough day before yessterday and when I upgraded database 🤔

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 12, 2025, 2:59pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/4 "2025-02-12T14:59:09Z")

</div>

I appreciate your skepticism.

That’s been the solution when I’ve had that error. A (very) quick internet search says the same.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 12, 2025, 3:01pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/5 "2025-02-12T15:01:40Z")

</div>

I’ll try it anyway, of course. Adding swap isn’t that big job. But I can’t understand why it happened 🤷‍♂️

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 12, 2025, 3:02pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/6 "2025-02-12T15:02:55Z")

</div>

I usually `grep /var/discourse/discourse-setup` and copy/paste the part that makes the swap.

I don’t understand either.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 12, 2025, 3:07pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/7 "2025-02-12T15:07:55Z")

</div>

2-container, and when I first stopped web\_only and then did both containers, it went through. So it can be lack of memory in deed.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 12, 2025, 3:47pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/8 "2025-02-12T15:47:14Z")

</div>

30 years ago the recommendation was to have as much swap as you had RAM. I don’t know what the rule of thumb is now, but I think with 8GB, adding 2 or even 4 isn’t a bad idea.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 12, 2025, 4:10pm UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/9 "2025-02-12T16:10:51Z")

</div>

I added 2 gigas. I don’t know why I’m trying to save disk space, though. Because if I’m ever in situation where I’m in troubles because I’m few gigas short I have bigger things to think than size of my swap.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 24, 2025, 6:37am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/10 "2025-02-24T06:37:14Z")

</div>

I did rebuilding (2-container) just few minutes ago and I got this:

```plaintext
Environment: production                                                                                                            
The setting 'staticAddonTrees' will default to true in the next version of Embroider and can't be turned off. To prepare for this y
ou should set 'staticAddonTrees: true' in your Embroider config.                                                                   
The setting 'staticAddonTestSupportTrees' will default to true in the next version of Embroider and can't be turned off. To prepare
 for this you should set 'staticAddonTestSupportTrees: true' in your Embroider config.                                             
building...                                                                                                                        
undefined                                                                                                                          
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod

```

What’s next?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 24, 2025, 6:40am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/11 "2025-02-24T06:40:53Z")

</div>

I had feeling I’ve seen this before.

> [@Rebuild fails with exit 1: ERR\_PNPM\_RECURSIVE\_EXEC\_FIRST\_FAIL](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862):
>
> This is all I found ERR\_PNPM\_RECURSIVE\_EXEC\_FIRST\_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod Ideas?

I had 8 GB RAM and swap is 2 GB — how much do I really need nowadays, if that comes from lack of memory?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 24, 2025, 8:04am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/12 "2025-02-24T08:04:45Z")

</div>

Well, I changed swap from 2G to 4G, and rebuilding went thru. So mayby it was again matter of amount of RAM. Or it was a fluke.

And then we are back in FAQ-topic: how much RAM does Discourse really need — because swapfile is de facto part of total amount RAM, and now it looks like the actual need is 11+ GB for small forum 😳

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 24, 2025, 10:27am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/13 "2025-02-24T10:27:26Z")

</div>

> [@Jagster](#):
>
> how much RAM does Discourse really need

Have you got the two kernel tunables set? They will affect how much virtual memory is needed.

> [@Should we increase the default swap space to 3GB or 4GB?](https://meta.discourse.org/t/should-we-increase-the-default-swap-space-to-3gb-or-4gb/294222/3):
>
> also set the two kernel tunables which affect the memory handling?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 24, 2025, 10:32am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/14 "2025-02-24T10:32:51Z")

</div>

I would answer no, because I don’t have any idea what you are talking about 🫣

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 24, 2025, 10:40am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/15 "2025-02-24T10:40:37Z")

</div>

I’m sure then, you haven’t set them!

Unfortunately tweaking the Linux kernel isn’t part of the official Discourse installation, but my understanding is that these two simple tricks will help your server run well and use less memory. Or, of course, you can do without but you might find you need more RAM+swap than you would like.

See [MKJ’s Opinionated Discourse Deployment Configuration](https://meta.discourse.org/t/mkjs-opinionated-discourse-deployment-configuration/193355) if you want more tips.

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [March 2, 2025, 3:27am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/16 "2025-03-02T03:27:54Z")

</div>

> [@pfaffman](#):
>
> 30 years ago the recommendation was to have as much swap as you had RAM. I don’t know what the rule of thumb is now, but I think with 8GB, adding 2 or even 4 isn’t a bad idea.

That was due to a particular characteristic of old memory management code, and doesn’t apply to Linux today. Now there is no real rule of thumb; it’s just a question of how much you need.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 1, 2025, 3:27am UTC](https://meta.discourse.org/t/rebuild-fails-with-exit-1-err-pnpm-recursive-exec-first-fail/351862/17 "2025-04-01T03:27:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
