Archived May, 2026.

Crash after attempting to update

TroLLoBlogger

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

Lilly

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.

Falco

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 ?

TroLLoBlogger

If you mean something else, tell me :smiley:

merefield

Out of interest have you got some swap configured?

That single vCPU might hurt you.

TroLLoBlogger

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

Falco

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…

david

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:

Falco

I know, what I meant is that the combo for

Non core plugins + single vCPU install

may be a case to warrant telling the user to do a rebuild.

NateDhaliwal

I have a 1vCPU, 1GB RAM server. Tried at least 10 times, never ran Discourse successfully after 1 occasion when it did (but I had to rebuild, which then created an endless failure cycle). I put 2 GB swap, then 5, all to no avail :person_shrugging: . No non-core plugins, just… failed.

TroLLoBlogger

1vCPU and 1GB RAM - this is a too weak server if I’m not mistaken, and in terms of RAM. Mine also has one CPU, but it has 4GB of RAM. Which is clearly still a bit low if there are external plugins. But I’ll think about it. For now, SWAP can work for me, if not, turning off the external plugins until I move to a larger server.

Falco

Yeah, the poor 1 vCPU trying to run nginx, ruby, postgresql, redis, and the nodejs for the rebuilt may be too big of a stretch.

Lilly

FWIW i’m running a 2VCPU w/4 GB RAM & 40 GB disk for one of my instances and added the discourse-doc-categories plugin to test the build (i also have 2 unofficial plugins on top of core ones):

               total        used        free      shared  buff/cache   available
Mem:           3.7Gi       1.6Gi        98Mi        69Mi       2.3Gi       2.2Gi
Swap:          2.0Gi        14Mi       2.0Gi

anyways, i just ran the latest (critical) update from the admin UI on my iphone for kicks, and it was quick and painless this time. :slight_smile:

sniper756

After updating once via the admin panel, I lost a large number of attachments. Since then, I have never used the admin panel for upgrades again; I always use rebuild instead.

merefield

They both do very similar things and won’t change the site content or the uploads folder. That is very surprising.

The main difference is the load on the server.