meglio
(Anton)
2017 年12 月 7 日 23:29
1
I’m trying to move ~100 posts to an existing topic.
After a delay of about 10 seconds, it says there was an error when moving posts in a green alert area:
No new entries in /logs
No useful information in console either:
What can be wrong and where to look for the error?
sam
(Sam Saffron)
2017 年12 月 7 日 23:36
2
Yeah, what this probably means is that you tried to get Discourse to do so much work it had to time out the web worker (which happens after 30 seconds)
We should fix the underlying issue here, moving 100 posts really should not take that long and we can defer a bunch of the work.
Marking this as a performance bug
meglio
(Anton)
2017 年12 月 7 日 23:38
3
For now, the work-around would be to move by small portions?
sam
(Sam Saffron)
2017 年12 月 7 日 23:39
4
Yes, absolutely. Your server is stretched anyway from what I can tell.
我刚才在尝试将帖子从一个线程移动到另一个线程时,遇到了 502 错误。
这个问题反复出现:
Pad_Pors
(Pad Pors)
2019 年9 月 22 日 14:25
7
在我们最近的情况下,将单篇帖子 移动到新主题时多次发生此问题。
codinghorror:
你移动了多少个?
我尝试了从几百个到几十个的多个集合,但都是单个帖子!
我无法找出为什么有时不起作用,而有时却完全正常的原因。
已更新至 2.4.0.beta4 (cb8fa46970),但在移动 1/5/10/50 条消息时仍会遇到 502 错误。
这破坏了管理流程,导致我无法整理一些线程。
sam
(Sam Saffron)
2019 年10 月 8 日 03:36
11
@gerhard 这是否与 @Pad_Pors 报告的其他问题类似?
我也看到了同样的问题。在日志中除了 /logs 下的这条信息外,没有找到其他相关内容:
错误:无原因短语
URL: https://.no/assets/ember_jquery-d430881a3fb1403871256e5a02423c4b20a78793685e92088613ca9a701baf88.js
请告诉我是否有更好的调试方法。
gerhard
(Gerhard Schlager)
2019 年10 月 8 日 19:16
13
我修复了一个错误,该错误在将帖子移入过去曾被拆分过的现有主题时可能出现。这是否解决了您遇到的问题?
committed 07:07PM - 08 Oct 19 UTC
Post timings are created by `topic_id` and `post_number` and it's possible that … the destination topic already contains post timings for non-existent posts. For example, this can happen if the destination topic was previously split and Discourse recorded post timings for moved posts in the destination topic.
This commit ensures that all timings which reference non-existent posts are deleted from the destination topic before the posts are moved.
您确定是在移动到新 主题时发生的吗?如果是,那么这与我在日志中发现并修复的错误不同。
gerhard
(Gerhard Schlager)
2019 年10 月 9 日 08:44
15
/logs 中有错误吗?您正在移动多少篇帖子?您正在移动主题的第一篇帖子吗?您正在移动到一个新主题还是现有主题?是否涉及任何异常情况(如私信、已删除的帖子或之前拆分过的主题)?
Pad_Pors
(Pad Pors)
2019 年10 月 9 日 08:46
16
是的,在 最近的更新 之前,我们在尝试将回复移动到新主题时曾遇到过 502 网关错误的问题(这种情况是随机发生的,并非总是出现)。
如果问题仍然存在,我会进一步报告。
不幸的是,我很难找到规律。在移动单个或多个帖子时会失败。不过,我有个直觉,当在两个较大的主题之间移动时失败的概率最高,而这类主题我有很多。其中许多主题已经被拆分过多次。我从未使用过“悄悄话”功能,但大多数主题中都有很多已删除的帖子。在 /logs 中没有发现确凿的错误信息:
编辑:我认为问题是在升级到 beta5 后开始的。
amotl
(Andreas Motl)
2019 年10 月 9 日 09:51
18
你好,
在 https://community.hiveeyes.org/ 上,我们最近在将帖子在不同主题之间移动时也遇到了同样的问题。虽然尚未进一步调查,
DiscourseMetrics:
我认为这是在升级到 beta5 之后开始的。
如果这有帮助的话:我们当时只是想移动单个帖子 [1],从一个非公开主题到一个公开主题,结果触发了这个错误。在该操作失败后,我们手动复制了该帖子。
此致,
Andreas。
[1] Pycom Firmware Release 1.20.1 - #9 by clemens - Firmwareschmiede / Firmware development - Hiveeyes
gerhard
(Gerhard Schlager)
2019 年10 月 9 日 15:17
19
好的,最新的版本应该已经修复了 500 错误 。我刚刚提交了 另一个修复 ,以便在存在其他 bug 时,将实际错误记录到日志中。
如果你遇到 502 错误 ,则说明移动操作耗时过长并导致超时。过去几个月里,我进行了大量更改,以便在移动帖子时迁移更多元数据。我尝试对其进行优化,但这在很大程度上取决于数据量,对于某些服务器而言,可能仍然过于消耗资源,无法在 30 秒内完成所有工作。
解决方案是再次重构此部分,将有关已移动帖子的信息永久存储在数据库中(而不是临时表),并在后台作业中执行所有繁重的处理工作。
这确实如此,因为请求返回 502 错误确实需要很长时间