# 502 errors when renaming large (by topic count) categories

**URL:** <https://meta.discourse.org/t/502-errors-when-renaming-large-by-topic-count-categories/164107>\
**Category:** Bug\
**Created:** [September 15, 2020, 4:32pm UTC](https://meta.discourse.org/t/502-errors-when-renaming-large-by-topic-count-categories/164107 "2020-09-15T16:32:24Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [September 16, 2020, 1:59pm UTC](https://meta.discourse.org/t/502-errors-when-renaming-large-by-topic-count-categories/164107/11 "2020-09-16T13:59:48Z")

</div>

Since I have the same issue on my development install on my home computer, I tried on my dev forum.

I tried to change the category name through Discourse interface. The error I’ve shown in my first post occured and my ram was filled up:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/a/a/aa8b19b5c906a85fd77fedd4e873382dfecd0b73.png)

Your query shows:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/6/166298d20fe7e3fa4b8c84b74f2a17ece2a3391f.png)

I tried updating from the rails console,  
Tried these two commands:

```ruby
ActiveRecord::Base.connection.execute("UPDATE categories SET name = 'General Discussion', topic_template = '', sort_order = '', default_view = '', read_only_banner = '', name_lower = 'general_discussion', updated_at = '2020-09-16 13:36:50.014192' WHERE categories.id = 21")

```

```ruby
Category.where(id: 21).update(name: "General")

```

Both worked like a charm.

---

_[View the full topic](https://meta.discourse.org/t/502-errors-when-renaming-large-by-topic-count-categories/164107)._
