The perils of switching from MyISAM to InnoDB

We've been seeing a lot of contention on one of the larger tables in our database recently. This table has a few billion rows (around 300GB), and uses MyISAM. As our usage has increased, we've started seeing more SELECTs being blocked by UPDATEs, so decided to switch the table to use InnoDB to allow concurrent reads and writes.

PHP Fatal error: Maximum execution time of 0 seconds exceeded

I've got a pretty long-running script. In our live environment this runs under command line PHP, but for convenience on my dev machine I just run it through Apache.

Initially I got an error

Fatal error: Maximum execution time of 30 seconds exceeded

No problem - just up the max_execution_time parameter to zero in my php.ini to give an infinite execution time, restart Apache, and start again. Trouble was, after about ten minutes, I got a slightly different error:

My First Android App

So, one of the main reasons I chose an Android phone instead of an iPhone (apart from not wanting to follow the herd) was so that I could develop my own apps and run them on my own phone. Yes - I know you can write apps for iOS as well, but I'm all PC, Linux and open source, and Mac development is going to need a bigger technology shift than I want to make right now (although I wouldn't rule it out in the future).

Linux and it's schizophrenic clipboards

I've been using Linux as my main development environment for a couple of months new (full details over here). The transition has been pretty easy on the whole, but I've been struggling with one of the most basic tasks - copying and pasting.

For historical reasons, Linux has two ways of copying and pasting:

MySQL Concurrency

I'm spending quite a lot of time at the moment working on performance optimisations for Analytics SEO, and learning much more about the subtle differences between the different MySQL storage engines.

Google Website Optimizer

I've been doing some interesting work lately using Google Website Optimizer to help with our signup page on Analytics SEO. The full gory details are over on the Analytics SEO Blog.

Force Drupal User Logout

in

I had an interesting problem this morning. One of our team had been demonstrating Analytics SEO to a potential reseller, and had forgotten to log out of the site at the end of the demo. He didn't really want to leave them with access to his account (which is a rather powerful administrator-type account), but also didn't really want to phone them and ask them to log out. The reseller is in South Africa, so I can't exactly sneak in and delete their login cookie either.

ADSL Router IP Address Weirdness

Bit of a weird problem this week about our customers not being able to access our pre-production websites. We have a test server in our office which we use to host websites during development so our customers can see progress and add their own content. Our internet access and networking is (mostly)  handled by a consumer-grade Netgear router/firewall/ADSL modem job, which is configured to route inbound http requests to our test server. All worked fine.

The importance of testing database restore processes

It's been said before, but good judgement comes with experience, but experience comes from bad judgement

We all know the golden rules on database backups:

  1. do backups
  2. test that you can restore from those backups

But how many of us actually do that second part? I've recently gained some experience (ahem!) on the importance of step 2.

The dangers of multiple Drupal database connections

Our latest venture, www.analyticsseo.com, is a pretty complex app for a Drupal site. There are two parts to the system:

  1. a back-end application, which crawls the web, analyses sites and competitors, and does all kinds of clever stuff
  2. a front-end application, which summarises this data, generates tasks, and manages workloads

Fortunately, Drupal makes it really easy to work with multiple databases. Simply add two database connection strings in the settings.php:

Syndicate content