# Failed to boostrap (exit code 137)

**URL:** https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [June 3, 2022, 1:50pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941 "2022-06-03T13:50:20Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ThatGuyJacobee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thatguyjacobee/32/262545_2.png) [@ThatGuyJacobee](https://meta.discourse.org/u/ThatGuyJacobee)
#### Post date: [June 3, 2022, 1:50pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/1 "2022-06-03T13:50:20Z")

</div>

Hi there, I’ve searched the forums to see similar issues that error 137 relates to a kill due to not enough memory. I tried some of the solutions people used but I still cannot get it to work without failing to boostrap, causing my discourse to be down for the past few days since I attempted to update to a new version via the web admin interface.

I’ve seen that I may need a swap file, as someone in another post suggested however I already have one which was automatically generated few months ago when I originally started my forum.

The ‘free’ command outputs:

```plaintext
              total used free shared buff/cache available
Mem: 2097152 124012 1964748 0 8392 1973140
Swap: 2097148 0 2097148

```

Log of the build: [Log for discourse - Pastebin.com](https://pastebin.com/GquQjcj5)

When monitoring the RAM usage, it seems it barely uses 1gb/2gb RAM the server consists of, so I’m not sure why it is klilling the process if it has another GB to use.

Hope I can get some help, thank you! 😀

---

<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: [June 3, 2022, 6:26pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/2 "2022-06-03T18:26:08Z")

</div>

Have you tried a command line rebuild yet?

```
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![ThatGuyJacobee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thatguyjacobee/32/262545_2.png) [@ThatGuyJacobee](https://meta.discourse.org/u/ThatGuyJacobee)
#### Post date: [June 3, 2022, 6:40pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/3 "2022-06-03T18:40:26Z")

</div>

Indeed, sorry forgot to mention that’s what I’ve been trying to do as suggested by the ./admin/upgrade page and that’s what the pastebin log is. Originally I was updating to a newer version, then it completely bugged out and errored in the web UI and forum went down.

Also, I tried running the ./discourse-doctor and it also states that the version is “NOT FOUND” but with the same error during the “building…” phase.

---

<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: [June 3, 2022, 7:15pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/4 "2022-06-03T19:15:50Z")

</div>

Oh. Sorry.

I Think you’ll just need to add more swap.

You should be able to start the old container with

```
  ./launcher start app

```

But if the database got migrated then the old container might not work.

---

<div class="post-metadata">

### Author: ![ThatGuyJacobee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thatguyjacobee/32/262545_2.png) [@ThatGuyJacobee](https://meta.discourse.org/u/ThatGuyJacobee)
#### Post date: [June 3, 2022, 7:41pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/5 "2022-06-03T19:41:01Z")

</div>

Yeah I think it got migrated because the forum is still inaccessible. I’m deleting my old swap right now and will create a new one following the docs, I’ll let you know how it goes.

---

<div class="post-metadata">

### Author: ![ThatGuyJacobee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thatguyjacobee/32/262545_2.png) [@ThatGuyJacobee](https://meta.discourse.org/u/ThatGuyJacobee)
#### Post date: [June 4, 2022, 12:01am UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/6 "2022-06-04T00:01:32Z")

</div>

Hey, so I ended up upgrading to 8gb ram and reinstalling ubuntu fully which fixed the issues with building, but I still can’t access the forum for some reason, with error “page cannot be reached”.

.admin/upgrade does show the message “You are running an old version of the Discourse image.” even though I’m running the latest version when I run git pull. So I’m completely confused what this could be. Any idea?

---

<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: [June 4, 2022, 12:22am UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/7 "2022-06-04T00:22:52Z")

</div>

I cannot imagine how those things could all be true. I can’t make sense of it.

If you’re getting an error when you access the site how are you seeing the upgrade page?

And if you did build a new image then you can’t have an old one. But doing a git pull isn’t enough, you need to build and launch a new image. It sounds like you’re still running the old one.

---

<div class="post-metadata">

### Author: ![ThatGuyJacobee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thatguyjacobee/32/262545_2.png) [@ThatGuyJacobee](https://meta.discourse.org/u/ThatGuyJacobee)
#### Post date: [June 13, 2022, 5:26pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/8 "2022-06-13T17:26:20Z")

</div>

Hey, I got it working in the end. Turns out the reason for the issue with the “page cannot be reached” was cause of Lets Encrypt’s re-certification limit of 5 in a week, so that was my mistake and the page I was seeing was just cached.

In the end I reinstalled the forum, and luckily had a pretty recent backup so I just restored that through the command, and then reinstalled my old plugins. And I also upgraded my the server to 8gb RAM since I might use it for other things and now the forum is all good, no more 137 exit codes. Working great now.

Cheers for all the topic help! 🙂

---

<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 13, 2022, 5:26pm UTC](https://meta.discourse.org/t/failed-to-boostrap-exit-code-137/228941/9 "2022-07-13T17:26:58Z")

</div>

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