I'm actually not an Inmotion subscriber - I was having this issue with Godaddy and left them because of the very same issue. I would be an Inmotion subscriber at this point if it weren't for this issue having occurred on your servers as well.
Here's the reason for this error that I've discovered and confirmed after days - yes, days of diagnosing and combing through raw access server logs, and then cloning the very same installations on others servers and seeing the issue immediately disappear. I've confirmed this reason, and if Godaddy had resolved it or if Inmotion took a different approach, I would have migrated my website to your servers. I still might, if you do one thing. But first, I'll explain the reason for the error, in case other readers happen to stumble upon this post.
A 522 error occurs when Cloudflare sends a GET query to your server (yours is the origin server) and doesn't receive a response back. There is a 15 second timeout after which the 522 error occurs. The reason this is happening is that one (or more) of Cloudflare's IP addresses has been blacklisted by your servers, presumably with iptables. What may have appeared as a brute force attack was probably a false positive, as Cloudflare itself is a top-notch security platform, and is endorsed by countless other hosts. It's an excellent, excellent solution.
There is a simple solution. Join the slew of other Cloudflare hosting providers and whitelist the Cloudflare IP set (https://www.cloudflare.com/ips). Done. The Godaddy technicians refused to do this, and so I left. If you did this, I would consider trying Inmotion, because I need a solid server that's quick for my websites. I would also ask, on behalf of your customers, that you take this request seriously, not only to save them hours and hours of frustration, but because it will cut down on your customer support. Do your due diligence on Cloudflare if need be, and whitelist their IP set. They're trustworthy and an excellent security platform. They routinely block attacks on my website, and that's saved me a number of times. They also take the load off of your servers as a top-notch free CDN, and fast websites make everyone happy.
John-Paul, I know this was not what you were expecting when you replied to this thread, but I wanted to make you and any other readers aware of the cause of this error. I wish you all the best and I hope this helps! Please let me know if you do whitelist the Cloudflare IPs on your end, because I'll sign up for an Inmotion account to see if you're as good as everybody says you are. Your customer service is top notch - I can tell that already.
All the best,