So about a week ago I switched hosting providers for this and 17 other personal low-traffic sites. In the process I took the chance to get familiar with Nginx, MariaDB, AWS EC2 Instances & EBS Volumes, and Capistrano. It was a great exercise, and surprisingly it worked on the first go! (at least for the majority of the week — read on)
For running and configuring WordPress on Nginx, I found the codex article a little confusing, but found this well-written article (with pictures!) by a WPMU contributor. Though I’m generally not a fan of WPMU’s plugins, this article put everything nicely in order for my mind and helped a great deal!
With all this newness came a growing pain yesterday. I’m running a micro instance on AWS. With the default MariaDB config and using InnoDB tables, it was trying to allocate 256M of memory when there wasn’t that much available with the other services running on the server. The way it manifest itself though was the worst…silently failing and then not allowing me to start the MariaDB server again. After several hours of Googling and downgrading from MariaDB 10.0 to MariaDB 5.5, I discovered the memory issue and got it working again! I needed to remove (rename) the existing InnoDB log files and modify the /etc/mysql/my.cnf
file to use only 50M (like I said, pretty small sites):
-innodb_buffer_pool_size = 256M
+innodb_buffer_pool_size = 50M
#protip initialize a local git repository before you change system config files!
The adage is true — the best way to learn something is to break it! Let me know if you find anything amiss or just downright broken ;)
Cool! Any particular pains involved with MariaDB? I’ve been meaning to take it for a test drive.
Drop in replacement for MySQL?
Nah, simple drop in replacement just as it boasts. Everything else — commands to start/stop and config files — the same so it doesn’t break existing cron or startup scripts. I downgraded to 5.5 b/c it was the stable one, back when I didn’t know why the DB was having issues starting. After all the troubleshooting it’s likely that it didn’t have any correlation and I could, if I wanted to, upgrade back to 10.0 w/o problems.