Basically, a 504 Gateway timeout error is related to the internet connectivity and it shows that the web server is waiting too long to respond from other service.