升级/重建 Discourse 时遇到错误

我在尝试升级/重建我的 Discourse 时遇到了错误:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --jobs $(nproc --ignore=1) --retry 3' failed with return #<Process::Status: pid 1868 exit 18>
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'
exec failed with the params {"cd" => "$home", "tag" => "build", "hook" => "bundle_exec", "cmd" => ["su discourse -c 'bundle install --jobs $(nproc --ignore=1) --retry 3'", "su discourse -c 'bundle clean'", "su discourse -c 'find /var/www/discourse/vendor/bundle -name cache -not -path \"*/gems/*\" -type d -exec rm -rf {} +'", "su discourse -c 'find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +'"]}
bootstrap failed with exit code 18
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

我看到上面有这些信息:

Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.23
Installing bundler 4.0.23
Your Ruby version is 3.4.10, but your Gemfile specified ~> 4.0.0
128:signal-handler (1794492346) Received SIGTERM scheduling shutdown...

我不知道,但你当时是不是内存不足了?

我的内存使用正常。我认为这是来自 docker-image/git 的内存限制导致的。

100Gb 就像是 git 错误中的内存限制吗?

是的,这是 100GB。所以肯定有什么东西出错了。

看起来你的 /var/discourse 目录比较旧——如果你运行 ./launcher rebuild,它应该会自动拉取更新。

为什么 git pull 需要 100GB,我也无法解释。