Last night, I started getting messages from users that my forum was slow and that they were seeing “504 gateway timed out” errors. I’ve spent hours debugging but haven’t had much luck finding the cause. What I’ve tried:
- Rolling back to a two day old Digital Ocean backup
- Restarting the app
- Rebuilding the app
- Deleting tmp/cache
- Moving from the 2GB droplet instance to the 4GB
- Disabled all plugins
When this didn’t help I tried setting up a local Vagrant install, but I actually get similar issues locally, whereby requests take up to 15s to complete. Usually the first page load loads normally, but then subsequent requests are slow.
I’ve looked at CPU and memory usage using htop, but to my untrained eye everything looks normal.