Forum upgrade crashing at Upgrade `docker_manager`

AI-generated summary

Multiple users are experiencing issues with the Forum upgrade crashing at the docker_manager step. modius reports high CPU usage and the need to reboot the server, while brunoedigital experiences high memory usage.

To resolve the issue, Steven recommends resetting the upgrade and rebuilding from the server using the commands:

cd /var/discourse
git pull
./launcher rebuild app

Additionally, codinghorror emphasizes the importance of having 2GB of swap space set up.

modius confirms that the lack of a swap file was the cause of the issue and provides a link to a guide on creating a swap file: https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880. They also note that the DigitalOcean instant install for Discourse does not set up a swap file by default.

My forum is crashing at this point in a web based upgrade; sends CPU to 100% and I have to reboot the server to recover; standard vanilla 2GB Droplet at DigitalOcean.

In Upgrade docker_manager

***  Bundling assets. This might take a while *** 
$ bundle exec rake assets:precompile
Purging temp files

Are there any manual steps to force an upgrade from the command line that might fare better?

Note, I realise it says it may take a while :wink: but its only a small forum and it never seems to recover.

Mine seems to be stuck as well. But on a different part. Last one that shows up is:

'367 /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/tzinfo-1.2.2/lib/tzinfo/country_index_definition.rb

Memory usage is high right now. Because of upgrade I believe.

Let’s see if it goes through or not.

If it doesn’t, what are the recommended steps? Reset upgrade and then manually rebuild via terminal?

What are the recommended commands to do that?

EDIT: in the end I had to reset it and then it went through.

BTW, is there a “normal” memory usage?

Mine seems pretty high. Only 84 free.

I think the best way is to reset upgrade then rebuild from the server.

cd /var/discourse
git pull
./launcher rebuild app

But before that, you may want to reboot the droplet manually using this command : shutdown -r now

The rebuild will upgrade everything and in 10-15 minutes, it will be over

Make absolutely sure you have 2GB of swap space set up.

Just thought I’d update on my fix. Turns out you were right to check if there was a swap file in place – there was not.

We use to have a swap file but…

This is how i got to this point, and it might be useful for others:

  • was upgrading discourse when postgres upgrade failed
  • rather than troubleshoot directly, thought we would simply spin up a new droplet, fresh install and restore from back-up
  • used the DigitalOcean instant install for Discourse (this was my MISTAKE)

Looks like the standard Digital Ocean jumpstart thing for Discourse does not set up a swapfile. Probably should have just run through a standard installation from a vanilla Ubuntu install.