I tried to upgrade Discourse but I have this message:
Sorry, there was an error upgrading Discourse. Please check the logs below.
********************************************************
*** Please be patient, next steps might take a while ***
********************************************************
Cycling Unicorn, to free up memory
Restarting unicorn pid: 663
Waiting for Unicorn to reload.
Waiting for Unicorn to reload..
Waiting for Unicorn to reload...
Waiting for Unicorn to reload....
Using oj 3.10.15
Using optimist 3.0.1
Using pg 1.2.3
Using r2 0.2.7
Using raindrops 0.19.1
Using rchardet 1.8.0
Using rinku 2.0.6
Using rotp 6.2.0
Using rqrcode_core 0.1.2
Using rtlit 0.0.5
Using rubyzip 2.3.0
Using tilt 2.0.10
Using sshkey 2.0.0
Using stackprof 0.2.16
Using unf_ext 0.0.7.7
Using xorcist 1.1.2
Using i18n 1.8.5
Using tzinfo 1.2.7
Using nokogiri 1.10.10
Using rack-test 1.1.0
Using mail 2.7.1
Using addressable 2.7.0
Using aws-sigv4 1.2.0
Using barber 0.12.2
Using cose 1.2.0
Using ember-data-source 3.0.2
Using sprockets 3.7.2
Using discourse_image_optim 0.26.2
Using faraday 1.1.0
Using request_store 1.5.0
Using message_bus 3.3.4
Using pry 0.13.1
Using rack-mini-profiler 2.2.0
Using rack-protection 2.1.0
Using uglifier 4.2.0
Using logstash-logger 0.26.1
Using mini_racer 0.3.1
Using sidekiq 6.1.2
Using mini_suffix 0.3.0
Using nokogumbo 2.0.2
Using omniauth 1.9.1
Using puma 5.0.4
Using rbtrace 0.4.14
Using redis-namespace 1.8.0
Using rqrcode 1.1.2
Using ruby-readability 0.7.0
Using sassc 2.0.1
Using unf 0.1.4
Using unicorn 5.7.0
Using webpush 1.0.0
Using activesupport 6.0.3.3
Using loofah 2.7.0
Fetching bootsnap 1.5.0
Using ember-handlebars-template 0.8.0
Using mini_scheduler 0.12.3
Using oauth2 1.4.4
Using omniauth-oauth 1.1.0
Using sanitize 5.2.1
Using pry-byebug 3.9.0
Using pry-rails 0.3.9
Using rails-dom-testing 2.0.3
Using rails-html-sanitizer 1.3.0
Using globalid 0.4.2
Using activemodel 6.0.3.3
Using aws-sdk-core 3.99.1
Using css_parser 1.7.1
Using actionview 6.0.3.3
Using activejob 6.0.3.3
Using active_model_serializers 0.8.4
Using activerecord 6.0.3.3
Using aws-sdk-kms 1.31.0
Using aws-sdk-sns 1.25.1
Using omniauth-oauth2 1.7.0
Using omniauth-twitter 1.4.0
Using onebox 2.1.4
Using actionpack 6.0.3.3
Using actionview_precompiler 0.2.3
Using aws-sdk-s3 1.66.0
Using omniauth-facebook 8.0.0
Using omniauth-github 1.4.0
Using omniauth-google-oauth2 0.8.0
Using seed-fu 2.3.9
Using actionmailer 6.0.3.3
Using railties 6.0.3.3
Using sprockets-rails 3.2.2
Using jquery-rails 4.4.0
Using lograge 0.11.2
Using rails_failover 0.5.7
Using rails_multisite 2.5.0
Using sassc-rails 2.1.2
Using discourse-ember-rails 0.18.6
Installing bootsnap 1.5.0 with native extensions
Bundle complete! 123 Gemfile dependencies, 161 gems now installed.
Gems in the groups test and development were not installed.
Bundled gems are installed into `./vendor/bundle`
$ bundle exec rake plugin:pull_compatible_all
docker_manager is already at latest compatible version
discourse-data-explorer is already at latest compatible version
$ SKIP_POST_DEPLOYMENT_MIGRATIONS=1 bundle exec rake multisite:migrate
Multisite migrator is running using 1 threads
Migrating default
== 20201027110546 CreateLinkedTopics: migrating ===============================
-- create_table(:linked_topics)
-> 0.0524s
-- add_index(:linked_topics, [:topic_id, :original_topic_id], {:unique=>true})
-> 0.0066s
-- add_index(:linked_topics, [:topic_id, :sequence], {:unique=>true})
-> 0.0045s
== 20201027110546 CreateLinkedTopics: migrated (0.0676s) ======================
Seeding default
[...]
Done compressing locales/ko-0c530732e52b234cd31ea1959ec4b5127cfcc2cb5b076d4999abfa0530e5bba5.js : 0.11 secs
8625116.65540771 Compressing: application-1e74fe54a11795d2a94b9b90ac1f18294214d956e95b882737a05319d5d11ff9.js
uglifyjs '/var/www/discourse/public/assets/_application-1e74fe54a11795d2a94b9b90ac1f18294214d956e95b882737a05319d5d11ff9.js' -m -c -o '/var/www/discourse/public/assets/application-1e74fe54a11795d2a94b9b90ac1f18294214d956e95b882737a05319d5d11ff9.js' --source-map "base='/var/www/discourse/public/assets',root='/assets',url='/assets/application-1e74fe54a11795d2a94b9b90ac1f18294214d956e95b882737a05319d5d11ff9.js.map'"
Killed
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:178:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:86:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.3/lib/rails/commands/runner/runner_command.rb:42:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.3/lib/rails/command/base.rb:69:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.3/lib/rails/command.rb:46:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.3/lib/rails/commands.rb:18:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `require'
bin/rails:17:in `<main>'
Spinning up 1 Unicorn worker(s) that were stopped initially
Does your machine have adequate RAM and swap? The free command or top commands can tell you. Also you could try dmesg | egrep -3i kill
to see if there’s information about a process being killed. I suspect out-of-memory (the OOM killer)
Well, oddly enough, my upgrade just failed the same way! I had successfully updated docker manager and data explorer, and got the ‘killed’ failure at the same step, running uglifyjs on the same file.
I have a Digital Ocean droplet with 1G RAM and 2G swap, and a relatively small forum (a backup is 700MByte)
This is probably related to the docker manager changes that try to keep the site running more during the upgrade, which would have increased the during-upgrade RAM requirements.
Container rebuild will always work because it takes down the site temporarily, so it gets maximum RAM.