200万件の投稿を移行したvBulletinフォーラムで504 Gateway Time-outエラーが発生

Discourse の新規インストール環境で、約 200 万件の投稿を持つ vBulletin フォーラムをインポートし、1 日あたり 200〜1000 人のアクティブ(同時接続)ユーザーが利用しています。

今日は Digital Ocean の Droplet(6 vCPU)でサイトを公開しましたが、最初は非常に動作が重く、504 エラーなどが頻発していました。vCPU を 16 に増設したところ改善されましたが、依然として 504 タイムアウトが頻繁に発生しています。

利用可能なリソースをより効果的に活用するために、nginx で設定できる項目について、何かガイドはありますか?

負荷平均値(load average)は依然として高い状態です。

ご提案があればお願いします。

ありがとうございます!

追記: リサイズ後に再構築(rebuild)を行っていなかったことに気づきました。これで新しいリソースを反映できるかもしれません。

I believe @pfaffman may have some advice.

You should be on an “optimized” droplet. Cpu speed will be important for your level of traffic.

After you resize you should run

./discourse-setup

Again. It’ll adjust the memory settings. You can control-c after its first message and then

./launcher destroy app
./launcher start app

Rather than letting it rebuild. (a two container installation will reduce downtime during rebuilds)

Things are likely slow due to lots of sidekiq jobs.

If you’d like hands on help tuning your installation my contact information is in my profile.

Awesome, thanks for the quick reply.

I’ll give this a shot and contact you if I run into any more trouble.