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

I believe @pfaffman may have some advice.