Cron Errors

I’m having a strange problem on some of my Drupal sites. Hourly a cron job runs to rebuild caches and do regular maintenance. This is something every Drupal site needs.

Some time in the last 6 months I was finding that cron would get stuck and not complete in the hour. Another would get started and block. Eventually my webhost stopped spawning processes for my user which lead to weird errors on my web page (page not found errors).

I was logged in as me, not the uber administrator when I started messing about. I cleared the cache tables, including the cache_menu table. I was planning on rebuilding the cache table, then the menu system. I was logged in with the wrong account, and I couldn’t remember the administrator account. Since I had thrown out the menu system, I couldn’t navigate to the lost password page.

I had royally messed up my site.

I fixed it by going into the DB and copying the known password from one user to that of the administrator account. I logged in as administrator, ran cron.php manually, then hit up the page to rebuild the menu system.

So far so good. The next day I ran into this tip: How to reset the password of user 1. A little DB query action to set the administrator account password.

I am still having the weird cron blocking issue though. Every couple days I just log in to my web host and kill the running processes and then everything runs fine for a bit. Bandaid solution that is labour intensive.

I can’t figure out how to debug cron issues in drupal though. I’ve read some tips that running update.php can reset things, but that didn’t work for me. I’ve read this page that suggest modifying core files to add more logging about which module is running cron. I think that will be my next step.

Studios Annoy

I saw this infographic on BoingBoing recently, and it really struck home for me. This is even more painful when you have an impatient child that just wants to watch their DVD and doesn’t understand why they have to watch previews and can’t skip things.

I’ve always wondered why movie studios think that it is a good idea to annoy and harass the customers that have paid for their product. To me that seems like a great way to drive away customers. Perhaps for my kids DVD’s that we have bought, I should make a backup copy that allows me to skip the unnecessary previews and ads.

The worst previews are the ones that advertise movies coming “this spring”. Once the DVD is a couple years old this just sounds silly.

via BoingBoing

Brizzly Inline

A long time ago I discovered TweetLens on Boris Mann’s site. I was looking for a web based Twitter client that allowed me to synchronize my reading between computers. Tweetlens offered this and was pretty slick.

Tweetlens has a long list of features that I love, but recently something happened on the site, and I started having problems logging in and getting content. It was unavailable for a while, and when I could login, it seemed a lot slower for some reason. The creator of TweetLens has also moved on to other projects and put the source code up on GitHub. I took a peak at the code, but it didn’t think it was in a state where I could figure out how to install it on my own domain.

I started to look for something new.

I quickly discovered Brizzly on TechCrunch. I’ve been using Brizzly for Twitter reading for about a week now, and although I miss a couple features from Tweetlens, I don’t think I will be going back.

First off, @Brizzly just looks a lot nicer and more polished. I may not be able to mark items as read, but the site tells me when there are more tweets to download, then after I retrieve them they are highlighted in yellow.

Brizzly allows me to quickly and easily switch between multiple accounts.

I can create groups of tweeps. Handy for getting common topics together. What I also discovered is that you can add people you don’t follow to a group. There are some people I like checking in on once in a while, but they tweet too much to follow them. I have a group for people just like this.

When scrolling down through the tweet list, they have a never ending scroll feature that is just awesome. When you reach the end, the page requests the next set of tweets and displays them inline. I don’t have to click a link to refresh the list.

Their DM’s are more like IM’s which is cool too. Url’s are auto expanded for you, twit pics and youtube video’s are displayed inline, you can save draft tweets, you can mute people, and more. Read their help page for a better list of features. Also, Brizzly uses OAuth for authentication, so you never have to give them your password.

Downside is that they are still in Beta, and you need an invitation code. Mine arrived a couple days after requesting it. They also seem receptive to suggestions and bug reports which is nice.

Overall my switch to Brizzly has been a good one.

Mistake Effect

A couple nights ago I did some maintenance here on muddylaces. I fixed a mistake I made a long, long time ago. When I first created this drupal site the first account I created was for gfox. I hadn’t read the best practices guide, so I didn’t understand that this was a bad thing.

Changing this in the database proved daunting and fraught with danger. While I was reading the Using Drupal book I discovered the views bulk operations module.

This module provided the ability to change the owner of a node. A light bulb went off and I quickly realized what needed to be done.

I set up a view to see all nodes (content) on my site. I then configured the view to allow bulk editing, and chose the “Change the author of a post (node_assign_owner_action)” operation. I tested this a bunch before enabling this view. The main issue I found was that I couldn’t target content for a specific userid. Instead I targeted content for the currently logged in user.

I then created a new_gfox account, and then when I was logged in as my first account started using the view to assign the content to my new account. A few minutes later I was done.

It was pretty easy to do this once I had the missing piece of the Views Bulk Operations. After the assigning was all done I renamed my first account, then renamed my new account.

The only unfortunate side effect was that the notification or subscription module went berserk with all the changes and sent out a ton of email to people who were subscribed. Woops, should have disabled that for a few minutes.

Disaster Domain

I had a bit of a disaster on this site recently. On Saturday I went about upgrading Drupal from version 5 to 6. I have always had no problem doing upgrades and fully expected this one to go fine as well.

I turned off all the extra modules, changed the site theme to the default, then pointed my domain to another Drupal directory I had with Drupal 6 in it. The actual upgrade was smooth, but I ran into a snag with the image module.

I then backed out of the upgrade. I pointed my domain back at the Drupal 5 install then did a DB restore. This is where it went bad.

The DB restore I chose said it was from 9 hays ago but I had read 9 hours ago. I waited for the restore to complete but I panicked when it seemed to take a while. I started another restore from the next oldest restore point, only to find my database completely empty. It was late at night on a weekend. I made a basic html page for my site and entered a support request.

The next day as I was preparing to head up island for Thanksgiving I checked my DB and saw that it had been restored. Loading my site I found that everything was there. Sure enough, Dreamhost support had come through and restored my DB.

Turns out the restore I had originally attempted was named incorrectly. I still don’t know why it didn’t work when I tried it.

The lesson I learned: back up the DB first! The dreamhost wiki has some information regarding this. I’ve instituted the nightly db backups for almost all my databases. With the script, I can run it just before an upgrade so I have a convenient way to revert.

Twitter Try

I’ve decided to try out twitter for a bit, and see if it can add anything interesting to my blog. My tweets are here.

I haven’t been to interested in Twitter since I don’t really get the point, but I thought I would try it out anyway. So far I can see how it would be more useful if I had a cellphone to post with. For now I will rely on the web, and a couple powershell scripts that I found and modified.

Reduce Telemarketers

The Canadian version of the National Do No Call List (DNCL) is now available for signing up. I just tried, but the site was down (maybe due to volume). It is sad that we need a list like this to try and stop telemarketers, but let’s look at the DNCL more closely.

From the site:

2. Who can still call you?

* Registering on the National DNCL will reduce but not eliminate all telemarketing calls and faxes.
* There are certain kinds of telemarketing calls and faxes that are exempt from the National DNCL, including those made by or on behalf of:

* registered charities seeking donations
* newspapers looking for subscriptions
* political parties and their candidates, and
* companies with whom you have an existing commercial relationship; for example, if you have done business with a company in the previous 18 months––such as a carpet-cleaning company––that company can call you.

* Telemarketers making exempt calls must maintain their own do not call lists. If you do not want to be called by these telemarketers, you can ask to be put on their do not call lists. They are obliged to do so within 31 days.
* For more information, see Part II of the Unsolicited Telecommunications Rules and the Telecommunications Act.

Good god, that is pretty much all the unsolicited calls I get. Charities seeking donation, newspapers wanting me to buy their waste of paper, and political parties. What is the point in signing up then? I’m still going to sign up all the numbers I have, just on the off chance that it might block one, but something else to remember is that you must remember to renew your entry in the DNCL every three years. I think that sucks, but phone numbers turn over still, and marketers need to be able to reach out. Still, couldn’t the phone companies let the DNCL know when a number has been released?

On the charity note. A tact I have taken recently for charities seeking donations is this: I tell them I don’t donate nor buy things over the phone. So far that has always made them stop talking and go away. Another ploy I use at work is that I always tell them they have reached my work number. I usually get an apology 🙂 Nice!

Backup Expires

I bought a Western Digital My Book from Costco a while ago. We originally bought the 500 GB version, but before opening it, I returned it and upgraded to the 1TB version.

Today I finally got around to unboxing it. The packaging was very easy to open and everything inside was neat and tidy. I plugged in the drive, and when it powered up, it asked if I wanted to install the software. I said yes, after unchecking the crapware that it would have installed by default.

The backup software installed without a hitch.

The first hitch occurred when I ran the backup software. It was trial ware, and I could buy it now, or try it out for 30 days. Uh, 30 days? That seems like an odd trial period for back up software. I plan to backup once a month. That means I get to try their software once, maybe twice, before it expires.

I’ve been looking at open source versions of backup software, so I think I will try them out next time.