504 Gateway Time-out errors with 2 million post migrated vBulletin forum

I have a new install of Discourse, where I imported a vBulletin forum with about 2 million posts and anywhere from 200-1000 daily active (concurrent) users.

I launched today on a Digital Ocean droplet with 6 vCPUs and browsing the site was pretty rough at the beginning … very slow, 504 errors, etc… I resized it to 16 vCPUs, and it’s working better but I am still getting 504 timeouts pretty often.

Is there a guide anywhere on what can be configured in nginx to help use the available resources better?

Load average is still pretty high.

Any suggestions?


EDIT: I realize I didn’t rebuild after resizing, and maybe that will take into account the new resources?

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


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.