Neil Turner's Blog

Blogging about technology and randomness since 2002

Stopping Movable Type eating your database

As per Jay Allen’s comment, if you are using Movable Type 4, make sure you have a cronjob with this in it:

cd /path/to/mt; ./tools/run-periodic-tasks

(where /path/to/mt is where Movable Type is installed)
This will make sure Movable Type clears out its session data and so it won’t eat your database for lunch. It also does a whole load of other magical things, especially if you have plugins, but keeping your session data in check is one of them. I thought I had this in place but it turns out I didn’t – hence why I ended up with several hundred megabytes of session data.

4 Comments

  1. Great tip. I wonder if everything that run-periodic-tasks does is documented somewhere? A quick search on movabletype.org doesn’t immediately reveal any goodies except for handling the publishing of future posts. I’d love to know what the “other magical things” are 😉

  2. Well in my case it pulls in feeds and republishes them (on a part of the site I haven’t launched yet) and also fetches comments from FriendFeed, in case someone comments there rather than here.

  3. Oh right, excellent. I think I really meant what does run-periodic-tasks do out of the box for everyone i.e it obviously clears session data based on your blog post so I was just wondering if that (and any other magical task it performs) was documented somewhere. A quick google of run-periodic-tasks doesn’t seem to provide anything of interest unfortunately.

  4. I’m glad to hear that run-periodic-tasks takes care of this. You had me worried! I already have it running every five minutes, so I’m good.