Delete this please. Thank you very much .
Sure you providedthe correct error message?
522 is a time Out, while ‘Bad Gateway’ would be 502
Why not? 
Here’s a collection of all 5xx errors. Please follow the steps in this post:
…
Delete this topic please.