Same in safe-mode (I don’t have custom themes or plugins anyway, except data-explorer), version 2.6.0.beta2
My server is on Ubuntu 18, has 4 vCPU, 8 GB ram, 160 GB disk space.
20-30 seconds maybe? Also, it doesn’t happen when renaming other categories.
edit: also happens on my development forum (fairly strong computer with a ubuntu subsystem).
re-edit:
splits by smaller batches seem to work. So Discourse doesn’t like to move more than 3000 topics, even of a more powerful server (I upscaled to a 16 vCPU / 32 GB). So I guess that this issue is different from renaming my categories. I still couldn’t rename the category.
I created a new category B (which I can rename at will), moved all the topics from the category A (which I can’t rename) to the category B: then I can’t rename category B anymore, and I can rename the category A.
I tried to rename my categories, choosing a category with more posts in it each time. Category with more content (more posts, larger topics) seems to take more time to be renamed.
There are 2 categories that I can’t rename (seems to take too much time indeed…):
I can rename Public profile messages, which contain only topics without replies.
I thought doing it this way, but I wasn’t sure it would be safe: I wonder why it would take that much time just to rename a category title in Discourse
Does it need to check stuff I don’t think about?
Apparently
I guess it might be recalculating some stats. What you could do is connect to Postgres and run something like
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
Update: I tried to rename a category on my other, live forum (different data/server/os/etc, but same Discourse version).
Changing a category name is slow (~10s). I tried multiple times and also encountered a 502 error once.
I feel like this is an issue from Discourse maybe related to a recent update?
Both forums use 2.6.0.beta2.
Can someone try to change a category name (a category with thousands, or tens of thousands topics) on their own forum, with the same Discours version to see if it is slow or generates a 502?
I don’t remember having a 502 error on my previous forum (which was also imported), but I haven’t renamed a category since the import 3 years ago. I don’t remember if renaming a category was slow.
As for my new, larger forum, it was imported on the Discourse’s version I’m mentioning so I can’t compare with an older version.
Just a correction about this: I think I previously did Category.where(id: 21).update(name: "General") for a category from which I moved the topics out or something like that, because I had to use this command multiple times on various categories right now, and it appears that the command duration is proportional to the number of posts in the target category.
So basically, it’s the same issue as when I update the category from the interface, except that it won’t timeout in the command line.
It took more maybe one minute for a category with more than 30000 topics, more than, 30 seconds on a topic with more than 15000 topics, and it was fast for categories with few topics.
Our forum has been getting increasingly error-prone over the last 6 months. I’ve just doubled our server resources (16 CPU’s, 64GB RAM) and while it runs much better, I’ve found a reproducible error.
Just trying to rename one category gives a 502 error every time.