但是就是没坏过,Docker Manager也是
需要多装几次
还真是挺奇怪的。
我更新就从来没有出错过,就是耗时时间长点,但错误是没有的。
上面的界面没有显示真正错误是什么,能看看错误日志吗?
通常错误信息都在日志上面。
这倒是没看,下次更新多留意一下!
每个更新我都点,只出过一次错。
********************************************************
*** Please be patient, next steps might take a while ***
********************************************************
Cycling Unicorn, to free up memory
Restarting unicorn pid: 546
Waiting for Unicorn to reload.
Waiting for Unicorn to reload..
Waiting for Unicorn to reload...
Waiting for Unicorn to reload....
Waiting for Unicorn to reload.....
Waiting for Unicorn to reload......
Waiting for Unicorn to reload.......
Waiting for Unicorn to reload........
Stopping job queue to reclaim memory, master pid is 573
$ cd /var/www/discourse && git fetch --tags --prune-tags --prune --force
$ cd /var/www/discourse && git reset --hard HEAD@{upstream}
HEAD is now at 0a6ecc04d Build(deps): Bump ember-auto-import from 2.7.4 to 2.8.0 (#28933)
$ bundle install --retry 3 --jobs 4
Fetching gem metadata from https://rubygems.org/........
Fetching i18n 1.14.6
Installing i18n 1.14.6
Bundle complete! 144 Gemfile dependencies, 183 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from i18n:
PSA: I18n will be dropping support for Ruby < 3.2 in the next major release (April 2025), due to Ruby's end of life for 3.1 and below (https://endoflife.date/ruby). Please upgrade to Ruby 3.2 or newer by April 2025 to continue using future versions of this gem.
1 installed gem you directly depend on is looking for funding.
Run `bundle fund` for details
$ if [ -f yarn.lock ]; then yarn install; else CI=1 pnpm install; fi
Scope: all 19 workspace projects
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +14 -6
++++++++++++++------
Progress: resolved 14, reused 5, downloaded 8, added 6
Progress: resolved 14, reused 5, downloaded 9, added 7
Progress: resolved 14, reused 5, downloaded 9, added 8
Progress: resolved 14, reused 5, downloaded 9, added 9
Progress: resolved 14, reused 5, downloaded 9, added 9, done
Done in 11.2s
$ LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all
discourse-microsoft-auth is already at latest compatible version
discourse-whos-online is already at latest compatible version
docker_manager is already at latest compatible version
replace-translations-global is already at latest compatible version
user-auto-active 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
Seeding default
*** Bundling assets. This will take a while ***
$ bundle exec rake themes:update assets:precompile
Checking 'Air Theme' for 'default'... up to date
Checking '分类组样式' for 'default'... up to date
Checking 'Discourse 可点击主题组件' for 'default'... up to date
Checking 'discourse-搜索横幅' for 'default'... up to date
Checking 'Mint' for 'default'... up to date
Checking '类别展示' for 'default'... up to date
Checking 'graceful' for 'default'... up to date
Checking 'FKB Pro theme' for 'default'... up to date
Checking '用户卡片样式' for 'default'... up to date
Checking '类别横幅' for 'default'... up to date
Checking '写稿编辑器样式' for 'default'... up to date
Checking '聊天气泡' for 'default'... up to date
Checking 'Central' for 'default'... updating from 89f2aa78 to 0ad175f2
DEPRECATION WARNING: The selector ".d-header-icons li >" is only valid for nesting and shouldn't
have children other than style rules. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/bogus-combinators
╷
193 │ li > {
│ ^^^^ invalid selector
194 │ height: 0.75em;
│ ━━━━━━━━━━━━━━ this is not a style rule
╵
/tmp/discourse_theme_dc9a936ec232cd076d0dbccca73becbf/discourse-central/stylesheets/discourse/header.scss 193:3 @import
_base.scss 20:9 @import
/var/www/discourse/common.scss 1:1067 root stylesheet
DEPRECATION WARNING: The selector ".d-header-icons li >" is only valid for nesting and shouldn't
have children other than style rules. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/bogus-combinators
╷
193 │ li > {
│ ^^^^ invalid selector
194 │ height: 0.75em;
│ ━━━━━━━━━━━━━━ this is not a style rule
╵
/tmp/discourse_theme_8363c5f04d776b6c34090d89506685d7/discourse-central/stylesheets/discourse/header.scss 193:3 @import
_base.scss 20:9 @import
/var/www/discourse/theme_31.scss 4:9 root stylesheet
DEPRECATION WARNING: The selector ".d-header-icons li >" is only valid for nesting and shouldn't
have children other than style rules. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/bogus-combinators
╷
193 │ li > {
│ ^^^^ invalid selector
194 │ height: 0.75em;
│ ━━━━━━━━━━━━━━ this is not a style rule
╵
/tmp/discourse_theme_2cd7612928cb6f38fd795291adf7c734/discourse-central/stylesheets/discourse/header.scss 193:3 @import
_base.scss 20:9 @import
/var/www/discourse/theme_31.scss 4:9 root stylesheet
Checking 'discourse-material-design-icons-outlined' for 'default'... up to date
Checking 'Header Search' for 'default'... up to date
Checking '主题切换' for 'default'... up to date
Checking '社交分享' for 'default'... up to date
Checking '侧边栏切换主题' for 'default'... up to date
Checking '暗色模式' for 'default'... up to date
Checking '登录界面美化' for 'default'... up to date
Checking 'Category Icons' for 'default'... up to date
Node.js heap_size_limit (2014.75) is less than 2048MB. Setting --max-old-space-size=2048 and CHEAP_SOURCE_MAPS=1
Building
Environment: production
building...
...[ConfigLoader]
...[Babel: discourse-widget-hbs > applyPatches]
...[Babel: @embroider/macros > applyPatches]
...[Babel: pretty-text > applyPatches]
...[Babel: discourse-common > applyPatches]
...[Babel: @ember/legacy-built-in-components > applyPatches]
...[Babel: ember-source > applyPatches]
...[ember.js]
...[Babel: @glimmer/component > applyPatches]
...[Babel: ember-this-fallback > applyPatches]
...[Babel: ember-load-initializers > applyPatches]
...[Babel: float-kit > applyPatches]
...[Babel: select-kit > applyPatches]
...[@embroider/compat/app]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
undefined
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:210:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:111: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/3.3.0/gems/railties-7.1.4/lib/rails/commands/runner/runner_command.rb:41:in `load'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/commands/runner/runner_command.rb:41:in `block in perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4/lib/active_support/execution_wrapper.rb:92:in `wrap'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/commands/runner/runner_command.rb:40:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/command/base.rb:178:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/command/base.rb:73:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/command.rb:71:in `block in invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/command.rb:149:in `with_argv'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/command.rb:69:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4/lib/rails/commands.rb:18:in `<main>'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
Spinning up 3 Unicorn worker(s) that were stopped initially
CHATGPT 告诉我的问题
根据日志信息,看起来Discourse论坛系统升级过程中遇到了问题,主要错误发生在资产预编译(assets:precompile)阶段:
1. 升级过程正常进行到了资产预编译步骤。
2. 在编译过程中,出现了一些SASS相关的警告,提示某些选择器语法在未来版本中将不再支持。
3. Node.js堆内存限制被设置为2048MB。
4. 在Ember.js构建过程中,命令被SIGKILL信号终止了,可能是由于内存不足。
5. Docker Manager插件报告升级失败,抛出了RuntimeError异常。
6. 最后尝试重启Unicorn workers。
可能的原因:
1. 服务器内存不足,导致Node.js构建过程被强制终止。
2. 某些主题或插件的SASS代码需要更新,以适应新版本。
3. 可能存在某些不兼容的插件或主题。
建议的解决方案:
1. 增加服务器内存,或临时关闭一些不必要的服务来释放内存。
2. 检查并更新主题和插件的SASS代码,解决警告信息。
3. 尝试禁用一些插件后再升级。
4. 检查日志中是否有更详细的错误信息,以定位具体问题。
5. 如果问题持续,可以考虑在论坛的官方支持渠道寻求帮助。
更新成功:
很显然内存不足导致的
了解了,Discourse 根据自己的一套性能测试方法 在app.yml中自动设定 Unicorn
数量 我是4c4g 的 7950x 所以默认给我设置了 启动 8个 Unicorn
我自己改成 4 个 Unicorn 没想到还是不够哈哈。
不知道你使用的是那个公司的 VPS。
我的机器是 2C4G 的情况,给了 5 个 Unicorn,到目前没有遇到任何有关升级的问题。
可能我的服务器超售了 实际内存没那么多
这个是很有可能的。
VPS 超卖这个事情很正常,就看销售公司的良心了。
Discourse 的服务器资源消耗比 WP 好高不少的,毕竟装了那么多的软件还有一个 Docker。
但是,我为啥感觉discourse比wp流畅?
对机器的要求高当然不代表客户端就不流畅了
Discourse 的缓存机制和数据层是做得非常不错的。
数据库跑的是 PGSQL,这东西本来就性能比 MySQL 强悍,虽然在小数据量的时候可能看不太出来。
同时他们又加了多层的缓存机制,Redis 都用上了。
从这几个技术架构来看,Discourse 的官方对数据优化是下了很大功夫的。
唯一麻烦点的就是 Ruby 这个语言实在比较小众。
ROR火的时候都是十几年前了,感觉主要还是时机问题,反正我实在是没法理解java这勾八语言是怎么变成中国基本上最火的语言的。
就算不谈ruby —— 早期ruby性能问题很大,甚至能被python爆杀(比python慢个十倍左右),ruby现在性能改进到比python快了,但是ruby热已经过去了—— 其他语言比java好的也多了去了啊。
java倒是确实引领了一代潮流,然后java以后的OOP语言基本上都在弥补java的各种缺陷。
Java 在企业应用上还是有很大的优势的。
不仅仅在中国,在美国这边,后端企业应用到一定数量级的时候还是在跑 Java。
当然,这种数量级不是一般的企业能达到的。
比如说,kafka 这种消息策略的怪兽,基本上也是 Java 写的。
在美国的金融领域,用 Java 写,没有人说有问题,但要换其他语言,直接就会被否决掉。
.Net 这就基本不考虑的,但 .net 的性能上其实不差的。
我们这边,最近上面喜欢搞 serverless,然后各种奇葩架构都来了,不过主流还是用 Python。
M 语言,没听过吧:Mumps 语言基础和历史
但这个语言现在是美国医疗系统事实上面的标准,EPIC 公司在用,用了差不多 50 多年了,能说有多垃圾就有多垃圾。
但没有人愿意轻易换掉,就在这种过时的技术上一路狂奔。
我们的医疗系统设计都是新的,没有技术负担,什么技术都可以用,所以看起来很多时候比美国的医疗系统漂亮多了。