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.
Updated to 2.4.0.beta4 (cb8fa46970) but still experience 502 error on moving 1/5/10/50 messages.
It brakes administration routine so I can’t tidy up some treads.
I fixed an error that could appear when moving posts into an existing topic which was split in the past. Does this fix the problem you are encountering?
Are you sure that it happened when moving to a new topic? If so, then that’s a different error than the one I fixed and noticed in our logs.
Is there an error in /logs? How many posts are you moving? Are you moving the first post of a topic? Are you moving to a new or an existing topic? Is anything out of the ordinary (like whispers, deleted posts or previously split topics) involved?
yes, (before a recent update) we have faced the problem of 502 bad gateway while trying to change replies into a new topic (it did happen randomly and not always).
I’m struggling to find a pattern, unfortunately. it fails when moving one or many posts. Though, I have a hunch it fails most often when moving between two larger topics, which I have a lot of. Many have been split several times. I’ve never used whispers but there are lots of deleted posts in most topics. No smoking-gun errors in /logs
edit: I think it started after upgrading to beta5.
on https://community.hiveeyes.org/, we recently experienced the same thing when moving posts between topics. While we haven’t investigated further,
If that might help: It was just a single post [1] we wanted to move from a non-public topic into a public one which raised this error. After failing on that, we replicated the post manually.
Okay, so the error 500 should be fixed on latest and I just commited another fix so that the actual error appears in logs in case there’s another bug in there.
If you get an error 502 then the moving takes too long and times out. I made lots of changes over the last couple of months to move more metadata when moving posts. I tried to optimized it, but it highly depends on the amount of data and might still be too resource intensive for some server to do all the work in under 30 seconds.
The solution will be to refactor this one more time and store information about moved posts permanently in the database (instead of a temp table) and do all the heavy lifting in a background job.