Pulling my hair out…

Gah, this is driving me crazy. For the last few weeks I’ve been noticing a series of (likely related) problems on this site. The most visible to readers is probably that when you try to leave a comment the page a) takes FOREVER to post the comment, like 30-60 seconds, and b) all too often resolves into a stoic “500 Internal Server Error” message. Usually it looks like the comment doesn’t even post, though if you refresh the page it’s there. This often leads to double postings or people just giving up on commenting entirely.

I’m having my own problems on the admin side. The Movable Type interface has gotten really slow, and I’m frequently unable to even post entries or rebuild the site without getting 500 errors.

Some quality time with Google has clued me in to a variety of possible causes, but I think I’ve ruled out many of the most frequently mentioned ones. All my CHMOD settings are correct for Movable Type’s .cgi files. I’ve streamlined my templates to make them smaller and minimize hits to the database (and I’m using MySQL, which is supposed to perform better). I’ve turned off auto rebuilding of templates that don’t need to be auto rebuilt. Et cetera et cetera.

Based on what I’ve been able to find out, the problem is this: because of the way MovableType works, it has to rebuild most of the archives and a variety of other inserts whenever someone posts a comment or I update with a new post. This isn’t a problem when I had 50 entries on the site, but I’m getting close to 800 now and that’s a lot of chugging. Now, most hosts, including the one I use, have little digital imps prowling their servers looking for the kind of excessive resource use that Movable Type creates under these circumstances. When they see it, they point and start screaming “AAAHHH! AAAAHH! WHAT’S IT DOING? KILL IT! KILL IT!” And they do. With much viciousness. This is, more or less, what interrupts the communication with the server and creates the 500 Internal Server Error message.

This angers me much, of course. I’ve e-mailed Dreamhost asking them to up the limits on resource usage so their imps will lay off, but to date they’ve just replied with messages amounting to “We don’t troubleshoot Movable Type. Piss off.” I sent in a fresh ticket in to them with more detail this morning, though, so we’ll see if they come through..

In the meantime, I’m considering my options. I don’t want to continue on like this with a broken system whatever the cause. If DreamHost doesn’t help me out I may look for another host. But I’m not convinced I wont’ have the same problems there. Another option would be to dump Movable Type and skip over to tis competitor WordPress, which uses a more modern approach to dynamically generate pages with PHP when they’re requested by a reader instead of laboriously churning out static files every time I blink or you comment.

A Google search on the phrase “Movable Type versus WordPress” turns out a plethora of informative articles on the question, and WordPress comes out the winner in almost every comparison. Some of it may have been bad mojo over Movable Type’s decision to move to more of a pay model (WordPress is open source and free), but looking closer it’s not all that. WordPress just seems to be better and perform better, especially if you know PHP (which, alas, I don’t).

The thing that’s really giving me pause, though, is the work that would be required to convert all this to the WordPress system. I’ve customized these templates a bit, and I’m not sure if I’d be capable of doing the work involved with recreating it in WordPress. And let’s face it, I’d probably want to do a redesign while I was at it, and that’s certainly a lot of work. I’m just not sure I have the time required to do it.

A stopgap solution might be to switch to WordPress using one of the default templates (they have lots) and get things going, then work on a fancier design and template as time permits. I may do that, because things just can’t stay like they are now. Any advice from anyone who has been in a similar situation would be appreciated.

Update: I seem to have (mostly) fixed this problem by a combination of changing to dynamic publishing and adding a line to my Movable Type configuration file to enable rebuilding in the background. It still takes 10-20 seconds to post a comment and the administrator interface is still slow, but at least everything is usable now.

Published by

5 thoughts on “Pulling my hair out…

  1. Sorry, I don’t have any advice, I just wanted to say that I’ve been toying with the idea of starting a blog for a while, and you have totally scared me out of it. 🙂 I hope you resolve your problems satisfactorily without having to do too much work!

  2. Ah, don’t let it scare you. I tend to get obsessed and control-freakish over stuff like this. 🙂 Both Movable Type and WordPress have plug-and-play solutions if you want a straight forward blog that uses one of the many default templates. You just have to know a little about how to edit files and upload them via FTP. If you can follow directions, you can do it. WordPress is supposedly usable “out of the box” in less than five minutes with the default settings.
    And even if not, there are even simpler services like Blogger, TypePad, etc. that are completely dummy-proof.

  3. MT also lets you serve your content dynamically too, instead of rebuilding your pages statically. In 3.2 and above, they made it very easy to check the ‘dynamic’ options for each template. You just need to update your .htaccess file according to the instructions here:
    http://www.sixapart.com/movabletype/docs/3.2/06_publishing/
    The gist is you probably want to leave your front page static for performance reasons, but make archives and category pages dynamic. Email/IM me if you need help.

  4. Ah, thanks Joost. For some reason I didn’t think of trying that. I enabled dynamic publishing on all the archives and was able to get through a full rebuild.
    I did a few test comments without barfing out to a 500 error, but I’ll have to wait and see how consistent it is or if it’s just a fluke. I’m still suspicious because it still takes a long time (over THREE MINUTES) for a comment to post, though they eventually did. The mt.cgi backend also runs very slowly. What could be causing that?

  5. Cool, Joost spent some time instant messaging with me and we got it (mostly) fixed! The biggest thing was adding a line to my mt-config.cgi file to enable background processing, but he also helped me get my archives set up to publish dynamically. Comment posting times are down to 18-20 seconds. Still too darn long and I’m not sure it won’t still occasionally time out, but much better.

Comments are closed.