Rebuild fails with exit 1: ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL

This is all I found

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

Ideas?

It ran too long. Try increasing swap or ram.

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 :thinking:

I appreciate your skepticism.

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

I’ll try it anyway, of course. Adding swap isn’t that big job. But I can’t understand why it happened :man_shrugging:

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

I don’t understand either.

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.

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.

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.

1 Like

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

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?

I had feeling I’ve seen this before.

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

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 :flushed:

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

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

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 if you want more tips.