I was getting this 502 Bad Gateway Error frequently from last few days, whenever I was opening my WordPress admin account. I used to do my website's work on the Google Chrome browser, and after getting this error, I started finding on Google to how to fix this 502 bad gateway error. After researching a lot, I found that this issue is related to cache, and if I clear the cache for my WordPress website in the Chrome browser then it could be resolved.
Key To Resolve 502 Bad Gateway Error
So finally, I found a key combination, to clear the cache for the current page in the Chrome browser, and that key combination is Ctrl+F5. This key combination also works in other browsers like Firefox, Internet Explorer to clear the cache. Now, whenever I am getting 502 bad gateway error, I just hit this key to fix the problem.