10 posts were merged into an existing topic: 502 errors when splitting topic, moving or renaming categories
This most annoying bug is still with us.
Could you give me instructions to nail the problem?
Unfortunately we are still running into this issue from time to time. I managed to collect some data about a recent problem where moving 27 posts into an existing topic (2013 posts) failed:
Beginning move at 2021-05-25 20:54:57 +0000
create_temp_table
0.000134 0.000027 0.000161 ( 0.002810)
delete_invalid_post_timings
0.000317 0.000065 0.000382 ( 0.306869)
move_incoming_emails
0.000056 0.000006 0.000062 ( 0.000478)
move_notifications
0.000074 0.000008 0.000082 ( 0.005584)
update_reply_counts
0.000088 0.000010 0.000098 ( 0.001058)
update_quotes
0.000079 0.000008 0.000087 ( 0.002426)
move_first_post_replies
0.000071 0.000008 0.000079 ( 0.000695)
delete_post_replies
0.000062 0.000006 0.000068 ( 0.000834)
copy_first_post_timings
0.000064 0.000007 0.000071 ( 0.002660)
move_post_timings
0.000082 0.000009 0.000091 ( 0.008195)
copy_topic_users
0.000398 0.000043 0.000441 ( 0.043640)
move_each_post
4.345220 0.132652 4.477872 ( 3.447047)
create_moderator_post_in_original_topic
0.163962 0.000253 0.164215 ( 0.207101)
update_statistics
0.217266 0.051660 0.268926 ( 45.258070)
update_user_actions
0.000934 0.000101 0.001035 ( 0.178894)
update_last_post_stats
0.001589 0.000171 0.001760 ( 0.003156)
update_upload_security_status
0.000030 0.000003 0.000033 ( 0.000034)
update_bookmarks
0.000492 0.000054 0.000546 ( 0.003832)
Finished move at 2021-05-25 20:55:47 +0000
Most methods finish real quick, but update_statistics
took over 45 seconds in this case. All that time is spent on the following method call:
Maybe we defer the update_statistics work to sidekiq?
Yes, probably. But I’m going to take a hard look at how complicated it would be to move the whole process into a Sidekiq job and let the UI wait until it’s finished. We are kinda playing whac-a-mole here by always moving bits and pieces into jobs.
Thank you for your hard work!
I also get this 502 when trying to merge topics. Not every time, but a lot of the time.
I’m doing this when someone has started a topic on a subject that already exists, so typically I’m trying to move only a very small number of posts (no more than five).
I haven’t read this entire topic, but I’m understanding that this is a known issue that you’re working on and there isn’t anything I can do myself?
I’m also experiencing this issue on our forum. A number of us are unable to edit and/or create new posts. We’re getting the following error message:
We are also having 502’s when moving posts.
It used to occur only occasionally and insisting usually worked. But now we have a case where it is consistently failing when trying to move a single post into a long-ish topic (2k posts), timing out after the ~30s.
The server is not particularly busy when this happens and copes just fine with the rest of the activity. Trying to move the post when activity is low has the same result. No difference with safe-mode.
Other than buffing up the instance (assuming that’s one solution for this?), anything else that we could try? Happy to provide more info if it’s of any use. Worth mention that I’m on the latest stable — would consider switching to latest beta if there’s recent changes for this.
Over the weekend (our slowest period) we temporarily tripled our storage max IOPS and then also tripled the max throughput and still can’t move a single post to the existing topic with 2k posts.
Leaving a new reply on the topic itself doesn’t seem to be a problem, so I guess there must be a lot more extra work involved when the post is being moved from somewhere, instead of being created anew. If it can’t be done under 30s, maybe it should be done on a background job instead of failing with a ‘502 error’ message?
Yep, it happens to me as well for old and lengthy topic above 3000 posts.
It’s still pain.