נכשל באתחול (קוד יציאה 137)

סיכום מבוסס בינה מלאכותית

ThatGuyJacobee encountered a bootstrap failure (exit code 137) while updating Discourse, suspecting memory issues despite having 2GB RAM and a 2GB swap file. Logs showed the build process was killed, though RAM usage appeared low. pfaffman suggested rebuilding via CLI and increasing swap, but ThatGuyJacobee confirmed they were already doing this and that the database likely migrated, making the old container unusable. After deleting and recreating swap, they upgraded to 8GB RAM and reinstalled Ubuntu, resolving the build issue — yet the forum remained inaccessible with “page cannot be reached”. Confusion arose because ./admin/upgrade claimed an old image was running despite git pull showing latest. pfaffman clarified that building and launching a new image is required, not just pulling. Eventually, ThatGuyJacobee resolved the issue: the error was due to Lets Encrypt’s certificate rate limit (5/week), and the page was cached. They restored from a recent backup, reinstalled plugins, and confirmed the forum now runs smoothly on 8GB RAM with no more exit code 137 errors. Thanks were extended for community support.

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:

              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

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! :grinning:

Have you tried a command line rebuild yet?

./launcher rebuild app

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.

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.

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.

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?

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.

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! :slight_smile: