The 50x series of errors are generally server related. Here’s a blog post on the 502 error:
You may have to contact you web host. They may be able to fix or at least point the exact cause of the error.
Hope this helps. Let me know what you learn.