diff --git a/app/models/tag_alias.rb b/app/models/tag_alias.rb index f59e05483..bf6703c1a 100644 --- a/app/models/tag_alias.rb +++ b/app/models/tag_alias.rb @@ -257,6 +257,8 @@ class TagAlias < ActiveRecord::Base end def self.update_cached_post_counts_for_all - execute_sql("UPDATE tag_aliases SET post_count = tags.post_count FROM tags WHERE tags.name = tag_aliases.consequent_name") + TagAlias.without_timeout do + execute_sql("UPDATE tag_aliases SET post_count = tags.post_count FROM tags WHERE tags.name = tag_aliases.consequent_name") + end end end