May 20, 2007

A Note On Fixes

Seems like this morning has been eaten up with the internal mechanics of the blog, but I want to add a couple of items to the update. As CQ commenters know, this all started out with problems in the comment scripting, although it went beyond that eventually. It turns out that MT users have some particular issues with comments, especially over a long period of time. The first, of course, is spam -- and when I dropped Typekey, I enabled other spam plug-ins to keep the spambots at bay. It turns out that I inadvertently made the problem worse, as Kevin at Wizbang! reports:

One of the features that keeps Wizbang running smoothly is the SpamLookup service that is a part of our blogging software. I actually use three products - SpamLookup, Akismet, and AutoBan to automate our spam prevention process. The three together work great; catching, removing, and banning the spammers automatically.

All of the sudden this week the comment process at all of the Wizbang sites went from blazingly fast to horrifyingly slow. There wasn't any good explanation since we're not really doing anything differently behind the scenes. After ruling out speed and server performance issues I went to work breaking down the comment submission process and all the dependencies. It turns out that the built-in SpamLookup service (which is on by default) uses a three different blacklist services for its lookups: bsb.spamlookup.net, opm.blitzed.org , and sc.surbl.org. A little investigation lead to this:

Please stop querying the opm.blitzed.org zone. As of May 2007 in order to reduce query load on our servers opm.blitzed.org is pointing at a blackholed nameserver -- queries will take a long time and result in a SERVFAIL.


The SpamLookup service was timing out (based on our observation it waited 20-30 seconds) trying to connect to opm.blitzed.org before the comment was successfully submitted.

Big thanks to Jim Lynch, Don Singleton, and others who pointed this out to me.

That's not the only problem, though. CQ commenters will never describe the comment process here as "blazingly fast". I doubt I'd get even a "leisurely pace". One reason we discovered is that MT wants to rebuild the entire comment table in order to add each comment. Hosting Matters found this workaround by Elise Bauer:

A few weeks ago I got a telephone call from my web host letting me know that "one of your Movable Type CGI scripts is using up half the resources of the server and would you please disable the script before we find it necessary to close your account?" Don't you just love news like that? Fortunately, it all got sorted out within a couple of hours; here's the scoop.

If you've had your MT blog for a while, since before version 3.2, you may have upgraded your MT installation, but didn't bother to make changes to the code in your templates. In the templates for one of the earlier versions of MT, if you use Typekey authentication, the Individual Entry Archive Template calls the comments.cgi script to invoke a javascript file that reads back to the commenter their name. Turns out that every time a page displays that includes a Typekey-authenticated comment, the CGI script will run. One of my sites is fairly high traffic, and starting some time last year I was getting over 25,000 requests to the comments.cgi script each day.

Read through the fix carefully. It is a problem even after you stop using Typekey for authentication. Elise's fix is what stops MT from rebuilding the entire comment table in the SQL database, and therefore keeps everyone a lot happier.

I think things should be back to normal. I'll be back to normal blogging later. If you are an MT user, drop a comment on this thread and tell me if any of this has been helpful.

TrackBack

TrackBack URL for this entry:
http://www.captainsquartersblog.com/mt/cq082307.cgi/10016

Comments (4)

Posted by Phil | May 20, 2007 8:58 PM

This is a comment.

Posted by Captain Ed | May 20, 2007 9:02 PM

And a fine one it is, too!

Posted by Del Dolemonte | May 20, 2007 10:35 PM

Hey, it's all Bush's fault!

Posted by James I. Hymas | May 21, 2007 12:51 AM

A lot of comments have been dropped in "The Myth Of Tax Cut Expirations (Updated)". Any chance of getting them back?