建议:警示潜在问题

3.2.0.beta4-dev 是简单重建,不是更新。运行在完全补丁的 Ubuntu 22 上。

  1. 参考下面的 Log1:我明白这些消息只是警告。我建议,当我们期望管理员看到类似“错误”的内容时,应在设置中注入 INFO:

INFO:以下命令可能会产生一个可忽略的预期警告。

  1. 同样,我们多年来一直看到有关“后台保存成功终止”的挂起或停滞的报告。问题不在于后台保存,而在于其后的过程,该过程没有被宣布。下一个操作可能比其他操作花费的时间长得多。这里的 INFO 注释也会有帮助:

INFO:以下操作可能需要很长时间。预计需要 5 到 30 分钟或更长时间。
INFO:请耐心等待,不要中断此过程。

  1. 实际的文本“后台保存成功终止”听起来很奇怪。为什么我们要“终止”一个正在保存某物的后台进程?

* 后台保存由 pid 904 启动
* DB 已保存到磁盘
* RDB 的 Fork CoW:当前 1 MB,峰值 1 MB,平均 0 MB
* 后台保存成功终止

我明白“后台没有被终止”,也就是说,“执行了一个旨在终止操作的动作。但是,“terminate”这个动词可以是及物动词或不及物动词。为什么不将其更改为不那么含糊的说法,例如“后台数据库保存已成功完成”?

  1. 参考下面的 Log2,与上面的 #2 相关。后台保存过程之后打算做什么?我不知道,但如果我等待 24 分钟,我就会看到“警告”消息,这些消息对我来说看起来确实像“错误”问题。在执行一个或多个长时间运行的操作之前,我建议提供一个 INFO 来描述将要尝试的操作:

INFO:即将进行与电子邮件相关的操作。
INFO:以下操作可能需要很长时间。预计需要 5 到 30 分钟或更长时间。
INFO:请耐心等待,不要中断此过程。

作为一份“问题报告”,我将指出,在最新的 beta-dev 版本中,20 多分钟的延迟和随后的警告总是发生。“LOG:数据库系统已关闭”消息以及之后出现的长时间停顿都令人担忧。

谢谢!!

Log1:

I, [2023-11-30T19:16:37.221350 #1]  INFO -- :
I, [2023-11-30T19:16:37.222007 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning " > @glint/environment-ember-loose@1.1.0" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > @glint/environment-ember-template-imports@1.1.0" has unmet peer dependency "ember-template-imports@^3.0.0".
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-c
js@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
warning " > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @ember/legacy-built-in-components@0.5.0" has incorrect peer dependency "ember-source@>= 4.8".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2023-11-30T19:20:49.159245 #1]  INFO -- : yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...

Log2:

110:M 30 Nov 2023 02:09:26.839 * Background saving terminated with success
2023-11-30 02:33:14.679 UTC [41] LOG:  lock file "postmaster.pid" contains wrong PID: 566 instead of 41
2023-11-30 02:33:14.689 UTC [41] LOG:  performing immediate shutdown because data directory lock file is invalid
2023-11-30 02:33:14.689 UTC [41] LOG:  received immediate shutdown request
2023-11-30 02:33:14.849 UTC [982] WARNING:  terminating connection because of crash of another server process
2023-11-30 02:33:14.849 UTC [982] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2023-11-30 02:33:14.849 UTC [982] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2023-11-30 02:33:14.898 UTC [48] WARNING:  terminating connection because of crash of another server process
2023-11-30 02:33:14.898 UTC [48] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2023-11-30 02:33:14.898 UTC [48] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2023-11-30 02:33:15.486 UTC [41] LOG:  database system is shut down
4 个赞

这里有一些好主意。

在我的初始安装过程中,长时间的停顿并没有引起我的注意——可能是因为我容易切换到另一个标签页而失去时间感。如果我更专注,我可能会认为进程卡住了而按下 CTRL-C 退出。

最近,我在重建以从问题中恢复,并密切关注事情的进展。日志中长时间的停顿和警告确实让我有点紧张。

如果开发人员在设置脚本中插入信息文本会很麻烦,我也不介意有一个附带的 README 文件,其中列出了预期的具体警告、后面跟着长时间停顿的命令以及其他不用惊慌的事情。

2 个赞

作为一名新用户,我正坐在这里看着我的终端窗口毫无动静,“后台保存已成功终止”是最后显示的内容,我非常赞同第二点!

2 个赞