The first thing that might be causing an error is some issue with your internet connection. You have to make sure that the internet connection is working just fine.
Browser cache is one of the common causes for 504 Gateway Timeout errors. You can clear your browser cache, and it may resolve the issue.
Proxy servers act as intermediaries between clients (such as web browsers) and other servers. These servers can sometimes cause problems. As a result, you can face the issue of 504 errors.