Delayed Job dying silently

I’ve just completed migrating a client site from BackgrounDRb to delayed_job (which is a huge relief on several levels). I had hoped to complete the process this morning, but the delayed_job process kept dying on me without any apparent explanation in the usual logs. Thankfully the RPM log in my app turned out to be capturing one vital detail – the MySQL server had “gone away”, Armed with that knowledge I was able to find this thread on github and from that Brandon’s pointer to the ‘reconnect’ option in database.yml. Setting that appears to have solved that last lingering problem. ...

MySQL 5.1

The MySQL developers seem to be developing a habit of rolling out useful new features in their .1 releases. MySQL 4 was a good release, but it’s the group_concat feature from 4.1 that I miss most often when forced to use a 3.x or 4.0 install. MySQL 5 made some huge leaps forward, but already there’s plenty of talk about the new features coming in 5.1. In particular, I’m looking forward to support for XPath and event scheduling. ...

Next/Previous with MySQL

For one current project involving the presentation of a program for an arts festival, I needed a way to present ’next’ and previous’ links within the results of a MySQL query. For example, the user might search for all artists who are sculptors and order the results by the artist’s last name. Ordinarily when building next/previous links I’m working without that level of sorting, and I ended up doing quite a bit of searching to find the best way to achieve this. ...