Updates:
This is what my PHP fpm status is showing
pool: www
process manager: dynamic
start time: 20/Feb/2019:00:55:03 +1100
start since: 57049
accepted conn: 78827
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 584
active processes: 4
total processes: 588
max active processes: 188
max children reached: 0
slow requests: 0
Hello bishwadeep
There can be a different reason for this to happen.
1) If you are using a VPN service to browse the web, then try disabling it.
2) If you are using a DNS level website firewall like Sucuri or Cloudflare, then try to temporarily disable the firewall. This will allow you to connect to your WordPress hosting server directly.
3) If you are connected to the internet through a proxy server, then that server may be unable to get a response from your WordPress website. Try accessing your website using a different internet connection or use online services to see if your website is down just for you or everyone.
4) If the DNS servers you are using are down or unable to connect to your website, then you could see a 504 gateway timeout error. The easiest way to check this is by changing the DNS servers your device is using.
5) A corrupt WordPress database may also trigger a 504 gateway timeout error. Don’t worry, your WordPress data is most likely safe. However, your database may need a little a bit of spring cleaning. This can be easily done by optimizing your WordPress database using phpMyAdmin or using a plugin like WP-Sweep. Make sure you backup the WordPress database before performing any action.
6) WordPress plugins and themes are less likely to cause a 504 gateway timeout error. However, if a plugin or theme is making too many requests to the server, then it is likely that some of these requests may drop off and trigger a 504 gateway timeout error.
7) Is It .htaccess?
Hope this info helps.
Thanks.