@successdav Did you log-in to your DigitalOcean dashboard and check the monitoring? Especially around the time your site wasn't reachable. 504 is not "Bad Gateway" by the way, that's 502.
Feb 5, 2021
2
Level 4
Wordpress Site on digital ocean frequently returns 504 Gateway Timeout
I had a similar issue in the past with a Laravel application and I was able to fix it by reducing the workload on pulling info from the DB.
But this time is a WordPress application hosted on Ubuntu 20.04 (LTS) x64 1 vCPUs 1GB / 25GB Disk I get this 504 Bad Gateway error 3-4 times daily and each time this error occurs, the site is down for about 5-10 minutes.
Here is the output from free -m
total used free shared buff/cache available
Mem: 981 741 69 80 169 40
Swap: 0 0 0
And the output I get from mpstat
Linux 5.4.0-51-generic (ubuntu-s-1vcpu-1gb-nyc1-01) 02/05/21 _x86_64_ (1 CPU)
21:59:40 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
21:59:40 all 3.59 0.02 1.17 0.63 0.00 0.06 0.02 0.00 0.00 94.52
And lastly the output from iostat 1
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.00 0.00 0.00 100.00
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
loop0 0.00 0.00 0.00 0.00 0 0 0
loop1 0.00 0.00 0.00 0.00 0 0 0
loop2 0.00 0.00 0.00 0.00 0 0 0
loop3 0.00 0.00 0.00 0.00 0 0 0
loop4 0.00 0.00 0.00 0.00 0 0 0
loop5 0.00 0.00 0.00 0.00 0 0 0
loop6 0.00 0.00 0.00 0.00 0 0 0
loop7 0.00 0.00 0.00 0.00 0 0 0
vda 1.00 0.00 4.00 0.00 0 4 0
Thanks
Please or to participate in this conversation.