Shortly after posting an update on Twitter to say that I had updated one of my websites to use a new CSS package, my VPS server went down. I have signed up to a free service called Uptime Robot, which emails me when my websites go offline. It was around 11pm, shortly after I posted the tweet when it happened and surely wasn’t a coincidence.
I use Monit to continually check and restart any failed services and upon checking the web interface, I could see that MySQL and DNS were both offline. By the time I had logged in and checked, they restarted themselves and everything was ok. I could see the Linux load start to fall back to normal. The services obviously failed under stress for some reason.
I might have expected this of an uncached WordPress site, but this was a simple HTML, PHP and CSS site. Also, I don’t have enough followers to warrant a sudden deluge of traffic from Twitter. I checked the Apache access log files for that site and couldn’t see anything obvious either.
This isn’t the first time this has happened.
I sometimes get random outages where MySQL fails under high load. I enabled a bigger swap file on my VPS which mostly cured the problem, but it still happens from time to time. But the problem is that I am not good enough at Apache or Linux to diagnose the issue.
I suspect that the issue last night was due to some sort of bot activity. Automated services began scraping the site once it was posted on Twitter. But I couldn’t see anything in the logs to prove this. Sometimes, my VPS goes offline when Google or Bing start to crawl my sites too quickly. Web crawlers and spiders can be hungry beasties at times!
I need to find a way of being able to log into my VPS via SSH and query the logs and see what the issue is. Either that, or find a good service I can install so I can see some pretty graphs that reveal the culprit. But most of the (free) Apache logfile analysis tools I have looked at don’t quite give me what I want.
I guess that’s the price you pay (or not) for running and unmanaged VPS on your own.
For a second, I almost confused the topic with VPL.