Moved to Rackspace Cloud

A couple of days ago, I encountered a database corruption. One sentence: My access log grew so huge it took up 100% of the disk space; MySQL can no longer write the database files and a few tables got corrupted.

Okay I cheated on the one sentence.

Rackspace Cloud has similar build as Slicehost (my previous host). I moved a few of my blogs over. Currently Slicehost is like an expensive DNS server. That said, Rackspace Cloud is cheaper than Slicehost. Slicehost is a subsidiary of Rackspace. Well anyway, if you do like to use Rackspace and would like to make my day, use my referrer code ‘REF-KW’ without quotations. It gives me some rebate, I think.

Bye Apache, Hi Lighty

As planned, Apache is no more. Say hi to Lighty

Lighttpd logo fly light

Made a few silly mistakes along the way and almost accidentally deleted my folder of pictures even. Things got a little more responsive. I haven’t used any caching solutions for WordPress. Caching is going to be tough work.

I just let PHP CGI spawn happily:

[code lang=”bash”]
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2655 www-data 16 0 99816 31m 3804 S 0 12.4 0:22.67 php-cgi
2651 www-data 16 0 96060 29m 3308 S 0 11.6 0:04.91 php-cgi
2656 www-data 16 0 93976 26m 3968 S 0 10.2 0:24.59 php-cgi
2654 www-data 16 0 94008 26m 3856 S 0 10.2 0:24.88 php-cgi
2653 www-data 16 0 91612 25m 3200 S 0 9.8 0:03.52 php-cgi
2657 www-data 16 0 89840 22m 3784 S 0 8.7 0:24.06 php-cgi
2652 www-data 16 0 89580 22m 3980 S 0 8.6 0:04.27 php-cgi
2650 www-data 16 0 86716 20m 3196 S 0 8.0 0:03.94 php-cgi
2313 mysql 15 0 139m 17m 4368 S 0 6.7 0:19.83 mysqld
2649 www-data 23 0 71676 6232 3708 S 0 2.4 0:00.01 php-cgi
2647 www-data 23 0 71676 6224 3708 S 0 2.4 0:00.02 php-cgi
2672 root 15 0 53468 2696 2136 S 0 1.0 0:00.00 sshd
2645 www-data 15 0 55084 2628 892 S 0 1.0 0:00.22 lighttpd
2433 root 15 0 36676 2124 1676 S 0 0.8 0:00.00 master[/code]

Lighttpd don’t exactly take up a lot of resources too.

Tonight I’ll fix the server

It’s been requiring almost a daily restart. I think it’s probably MySQL or Apache’s fault. Or perhaps it’s just my fault for being a miser not wanting to pay for more. Either way, I’m going to fix it. So far, I’m done with the virtual hosts. Lighttpd isn’t as hard as I thought. PHP is working fine already. I’m still in the midst of testing if WordPress works. Once I’m done with that, it’s “sudo apt-get remove apache2”.

Character encodings are important!

I’ve been reading about character encoding recently, in particular to the various unicode standards. I’ve been rather pissed off with setting up the wrong collation in MySQL, I just realized that at my other blog, I have posts that are in utf8_unicode_ci, latin1_general_ci and utf_general_ci. This is what you get when you migrate database blindly without knowing what is character set. I regret not reading enough. Now I set everything to utf8_general_ci.

Anyway, something about another encoding set – GB2312 – caught my attention.

Here’s a trivia, the older Chinese encoding GB2312 cannot write the former Chinese Premier Zhu Rongji’s name. His name has often appeared as 朱熔基. Zhu disapproves of this and prefers the correct version, 朱镕基. Continue reading “Character encodings are important!”