HTTP 502 エラーの解決方法

How big is your database? You should have enough ram to hold the entire database in cache.

There are settings in the yml file for tuning memory usage. If you run discourse-setup it attempts to set them but you might need to tweak them.

Were you running Discourse somewhere else with similar traffic and didn’t have these problems?