I am getting 502 error while trying to delete topics created by specific user

I don’t have such a huge forum for me to try, this is just my thoughts.

Change

      posts = user.posts.order(created_at: :asc)

to

      posts = user.posts.limit(1000)

Then execute it every 10 seconds until the post is nil

1 Like