# Pups ExecError while rebuilding

**URL:** https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [June 9, 2022, 4:20pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535 "2022-06-09T16:20:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![OverseersMight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overseersmight/32/228719_2.png) [@OverseersMight](https://meta.discourse.org/u/OverseersMight)
#### Post date: [June 9, 2022, 4:20pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535/1 "2022-06-09T16:20:04Z")

</div>

```plaintext
2022-06-09 15:54:49.619 UTC [42] LOG: background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-06-09 15:54:49.620 UTC [46] LOG: shutting down
2022-06-09 15:54:49.671 UTC [42] LOG: database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process:
:Status: pid 268 exit 137>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test developm
ent'"]}
bootstrap failed with exit code 137

```

I’ve been getting this error when rebuilding, I have no idea what to do.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 9, 2022, 4:47pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535/2 "2022-06-09T16:47:34Z")

</div>

I think error code 137 is not enough memory.

Do you have a swap file set up? You can check by running `free` on the command line.

Alternatively, you could upgrade and add more RAM?

One I haven’t tried yet but have read a few times on here is adding `vm.overcommit_memory = 1` to /etc/sysctl.conf

**Edit:** This is from a different-but-similar topic, and has the text from the log in:

> [@3G RAM + 1G Partition Swap - is it enough?](https://meta.discourse.org/t/3g-ram-1g-partition-swap-is-it-enough/228951/13):
>
> WARNING overcommit\_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit\_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit\_memory=1’ for this to take effect.

---

<div class="post-metadata">

### Author: ![OverseersMight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overseersmight/32/228719_2.png) [@OverseersMight](https://meta.discourse.org/u/OverseersMight)
#### Post date: [June 9, 2022, 6:01pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535/3 "2022-06-09T18:01:53Z")

</div>

I do not have a swap file setup, I’ll check on how to do it and get back to you.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 9, 2022, 6:06pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535/4 "2022-06-09T18:06:28Z")

</div>

I think we may have a How-To for that:

> [@Create a swapfile for your Linux server](https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880):
>
> bulb For servers with \<= 4GB of RAM, running ./discourse-setup will prompt for and automatically create a 2GB swapfile. Most cloud virtual machine providers do not set up swapfiles as part of their server provisioning. In particular, upgrading Discourse produces a lot of memory pressure. With a swap file, rather than randomly terminating processes with an out of memory error, things will slow down instead. Having a swap file is a cheap insurance policy that protects you from many other lo…

---

<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: [July 9, 2022, 6:06pm UTC](https://meta.discourse.org/t/pups-execerror-while-rebuilding/229535/5 "2022-07-09T18:06:45Z")

</div>

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