I’ve had a ton of downtime this week (this seems to be the busy time of year for my web server), but I think I traced the problem to a known issue.
MySQL crashed on me sometime late Sunday or early Monday. Somehow the server managed to serve up 5-6 pages per day in a catatonic state on Monday and Tuesday. So I spent my lunch break digging into the problem.
In one of its throwaway kid’s sitcoms, Disney insinuates that open source software contains spyware and using it is a ‘rookie mistake’.
Open source software rarely contains viruses or spyware. Since it’s open for examination, changes to the code that have any funny business in them tend to be rejected. For that matter, code with unintended bad consequences tends to either be rejected, or quickly changed.
My new server is up and running, and let me tell you, it’s spectacular.
And if you’re reading this on 6 March 2012, you’re probably wondering what I’m talking about, because everything looks just as slow as usual. That’s because the new server is still behind my firewall because I’m struggling to get my content all moved to it.
I got my new 64-bit web server up and running today. Now the main task that remains is to get my data moved over to it. I talked myself into going with an Apache setup, since one program I want to run (Webtrees) is designed for Apache and its search engine optimization seems to work better under Apache than Nginx. It’s fast anyway; displaying the 17-person family of Andrew Davis McQueen of Leesville, Mo., briefly consumes 2% of the available CPU time in Webtrees with the APC PHP cache installed and enabled. And that should get better, seeing as newer, faster, better versions of both Apache and PHP were released in the last month.
As I built my new 64-bit web server, I messed up MySQL a couple of times. When you break MySQL beyond repair, here’s how to start over with a fresh MySQL install and a fresh /var/lib/mysql without doing a Windows-like reformat and reinstall of the entire operating system:
My new fire-breathing dragon of a server is sitting idle at the moment. I would have liked to have had it up and running today, but now I’m starting to realize why it took me so long to migrate off my Pentium II-450. Setting up Linux web servers is a lot more complicated than it was in 2001.
They can do a lot more than they could in 2001 too, but when I first built that server, the process literally went in about three steps: Install Debian, apt-get install apache mysql php, then download blogging software, create a MySQL database and account for it, edit a config file, then start blogging. You could get it done in an hour, and a lot of that time was waiting for stuff to load off a CD-ROM or download over a 256K DSL connection.
Arstechnica posted a nice writeup on Nginx, a cut-down webserver that does less than Apache does, but does the few things it does much faster. That’s nothing particularly new, as smaller and faster webservers have existed for as long as I can remember.
What makes Nginx different is that it can work with PHP. And therefore, it can run WordPress.
Yesterday must have been Webserver Wednesdsay, because two things happened. A new version of Apache was released, and a new tool for testing the vulnerability of webservers to denial of service (DoS) was released.
There is a nasty Apache exploit going around right now that exploits a vulnerability in versions 1.3.x, 2.0.x and 2.2.x. Basically, it allows the process to exhaust all available memory and crash by sending GET requests with overlapping byte ranges. The methodology seems to borrow a page from the teardrop attack. Yes, I’ve been studying for a security certification….
I noticed yesterday that my site was painfully slow, and my server was thrashing like nobody’s business. My access logs suggest that my site has been crawled incessantly by online casinos and other various forms of lowlife, and that it’s been happening for some time.
Hopefully that’s over now.