I'm beginning to think '502 Bad Gateway' is a product of @HeartInternet - I see it so often when working on a site hosted with them.