It was likely someone else who was sharing the server with you. I had a similar experience. For one, there are lots of scraper bots out there stressing servers. So the server could have been pooping out on you because of that, or just too many cpu intensive apps running on it.
I disabled gzip, which provided some minimal relief. But ultimately I moved the whole thing to a dedicated server and haven't had a single problem, not one. So it was definitely not the software, it was the shared host.