Crash after attempting to update

After trying to update Discourse through the admin panel, the process crashed, and my forum wouldn’t load. Fortunately, there is a solution to the problem :slight_smile:

Open a terminal on your server, then run the following commands:

cd /var/discourse

./launcher rebuild app

After the rebuild was completed, everything went back to normal for me and the forum was updated. I’m also leaving a log of the error that caused the problem because it is related to a Discourse plugin.

LOG

Compiling 46 plugins…
rake aborted!
AssetProcessor::TimeoutError: [PLUGIN discourse-doc-categories] Script terminated: timeout after 120s (AssetProcessor::TimeoutError)
/var/www/discourse/lib/plugin/js_compiler.rb:32 ‘Plugin::JsCompiler#compile!’
/var/www/discourse/lib/plugin/js_manager.rb:136 ‘Plugin::JsManager#compile_js_bundle’
/var/www/discourse/lib/plugin/js_manager.rb:57 ‘block in Plugin::JsManager#compile!’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:689 ‘Parallel.call_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:659 ‘Parallel.process_incoming_jobs’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:638 ‘block in Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Process.fork’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:619 ‘block in Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Array#each’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Enumerable#each_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:557 ‘Parallel.work_in_processes’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:304 ‘Parallel.map’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:248 ‘Parallel.each’
/var/www/discourse/lib/plugin/js_manager.rb:56 ‘Plugin::JsManager#compile!’
/var/www/discourse/lib/tasks/assets.rake:27 'block in ’

Caused by:
AssetProcessor::TimeoutError: Script terminated: timeout after 120s (AssetProcessor::TimeoutError)
/var/www/discourse/lib/asset_processor.rb:185 ‘MiniRacer::Context#call’
/var/www/discourse/lib/asset_processor.rb:185 ‘block in AssetProcessor.v8_call’
/var/www/discourse/lib/asset_processor.rb:184 ‘Thread::Mutex#synchronize’
/var/www/discourse/lib/asset_processor.rb:184 ‘AssetProcessor.v8_call’
/var/www/discourse/lib/asset_processor.rb:264 ‘AssetProcessor#rollup’
/var/www/discourse/lib/plugin/js_compiler.rb:21 ‘Plugin::JsCompiler#compile!’
/var/www/discourse/lib/plugin/js_manager.rb:136 ‘Plugin::JsManager#compile_js_bundle’
/var/www/discourse/lib/plugin/js_manager.rb:57 ‘block in Plugin::JsManager#compile!’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:689 ‘Parallel.call_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:659 ‘Parallel.process_incoming_jobs’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:638 ‘block in Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Process.fork’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:619 ‘block in Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Array#each’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Enumerable#each_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:557 ‘Parallel.work_in_processes’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:304 ‘Parallel.map’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:248 ‘Parallel.each’
/var/www/discourse/lib/plugin/js_manager.rb:56 ‘Plugin::JsManager#compile!’
/var/www/discourse/lib/tasks/assets.rake:27 'block in ’

Caused by:
MiniRacer::ScriptTerminatedError: terminated (MiniRacer::ScriptTerminatedError)
/var/www/discourse/lib/asset_processor.rb:185 ‘MiniRacer::Context#call’
/var/www/discourse/lib/asset_processor.rb:185 ‘block in AssetProcessor.v8_call’
/var/www/discourse/lib/asset_processor.rb:184 ‘Thread::Mutex#synchronize’
/var/www/discourse/lib/asset_processor.rb:184 ‘AssetProcessor.v8_call’
/var/www/discourse/lib/asset_processor.rb:264 ‘AssetProcessor#rollup’
/var/www/discourse/lib/plugin/js_compiler.rb:21 ‘Plugin::JsCompiler#compile!’
/var/www/discourse/lib/plugin/js_manager.rb:136 ‘Plugin::JsManager#compile_js_bundle’
/var/www/discourse/lib/plugin/js_manager.rb:57 ‘block in Plugin::JsManager#compile!’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:689 ‘Parallel.call_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:659 ‘Parallel.process_incoming_jobs’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:638 ‘block in Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Process.fork’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:629 ‘Parallel.worker’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:619 ‘block in Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Array#each’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Enumerable#each_with_index’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:618 ‘Parallel.create_workers’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:557 ‘Parallel.work_in_processes’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:304 ‘Parallel.map’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-2.1.0/lib/parallel.rb:248 ‘Parallel.each’
/var/www/discourse/lib/plugin/js_manager.rb:56 ‘Plugin::JsManager#compile!’
/var/www/discourse/lib/tasks/assets.rake:27 'block in ’
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
/var/www/discourse/script/assemble_ember_build.rb:167 ‘Kernel#system’: Command failed with exit 1: bin/rake (RuntimeError)
from /var/www/discourse/script/assemble_ember_build.rb:167 ‘’
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:205 ‘DockerManager::Upgrader#run’
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:105 ‘DockerManager::Upgrader#upgrade’
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19 'block in ’
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6 ‘Kernel#fork’
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6 ‘’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/commands/runner/runner_command.rb:44 ‘Kernel.load’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/commands/runner/runner_command.rb:44 ‘block in Rails::Command::RunnerCommand#perform’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.5/lib/active_support/execution_wrapper.rb:91 ‘ActiveSupport::ExecutionWrapper.wrap’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/commands/runner/runner_command.rb:70 ‘Rails::Command::RunnerCommand#conditional_executor’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/commands/runner/runner_command.rb:43 ‘Rails::Command::RunnerCommand#perform’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.5.0/lib/thor/command.rb:28 ‘Thor::Command#run’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.5.0/lib/thor/invocation.rb:127 ‘Thor::Invocation#invoke_command’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/command/base.rb:178 ‘Rails::Command::Base#invoke_command’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.5.0/lib/thor.rb:538 ‘Thor.dispatch’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/command/base.rb:73 ‘Rails::Command::Base.perform’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/command.rb:65 ‘block in Rails::Command.invoke’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/command.rb:143 ‘Rails::Command.with_argv’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/command.rb:63 ‘Rails::Command.invoke’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/railties-8.0.5/lib/rails/commands.rb:18 ‘’
/usr/local/lib/ruby/3.4.0/bundled_gems.rb:82 ‘Kernel.require’
/usr/local/lib/ruby/3.4.0/bundled_gems.rb:82 ‘block (2 levels) in Kernel#replace_require’
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/bootsnap-1.24.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33 ‘Kernel#require’
bin/rails:18 ‘’
Spinning up 1 Pitchfork worker(s) that were stopped initially

If anyone in the community is still having trouble with the update, please post in the comments here and I’ll try to help.

Thank you <3

this is why i never update from the admin UI :woman_shrugging:t2:

this is the usual way for updating self-hosted standard installs

that is great you figured it out and got it back up. no one likes a forum being inaccessible.

3 Likes

Looks like it was a specific plugin that couldn’t be built in the 2 minutes time limit.

Can you share your server specs @TroLLoBlogger ?

2 Likes

If you mean something else, tell me :smiley:

Out of interest have you got some swap configured?

That single vCPU might hurt you.

2 Likes

Yes it is possible. But two days ago there were absolutely no problems with the update. I will also do a 2GB swap and we will see :slight_smile:

sudo fallocate -l 2G /swapfile        
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

2 Likes

Hmmm single vCPU doing web updates with the complexity of building the front end assets may be too big of a stretch nowadays.

What do you think @david ? With prebuilt assets it would work fine, but we may need to detect and disable web updates on that combination…

2 Likes

Pre-built assets should be pulled in, even with a web-based update (they’re distributed separately from the docker image)

doc-categories isn’t a core plugin, so we don’t distribute assets for that. But… it’s a very simple plugin. 120s is a very long time for it to be taking :thinking:

2 Likes