Problems with MovableType and mt-tb.cgi
Posted April 24th, 2006 @ 05:37pm by Erik J. Barzeski
Interland (now web.com or something) literally changed the permissions on The Sand Trap's cgi-bin directory to 000 because mt-tb.cgi was being hit hundreds of times per minute. I have a script that checks every five minutes (now every one minute) and, if more than 30 CGI scripts are running, kills mt-comment.cgi, mt-search.cgi, and mt-tb.cgi. Earlier today, when it was running every five minutes, 200+ mt-tb.cgi were running between each "kill" cycle. Ridiculous!
I'm not sure what the cause is or how to fix it. I'm running only the Akismet filter, currently, which has done a halfway decent job. I've turned off all other spam filtering in the hopes that mt-tb.cgi and other scripts would "die" sooner. Yet the scripts continue to live, sucking up a little bit of resources multiplied by two hundred.
The Sand Trap's files (images, .php, .cgi files, but not its databases) are hosted on a shared account, making this not only my problem, but problems for other people as well.
I cannot set the timeout value for CGI scripts lower because some MovableType operations take quite awhile (like uploading an image, publishing an entry, etc.).
What to do? We still use trackbacks, particularly internally for "related articles," and even the maximum limits in mt-config.cgi are set to reasonable levels (10 per hour, 100 per day). Yet still these mt-tb.cgi scripts just linger on and on and on and on, clogging up the system.
Posted 24 Apr 2006 at 7:38pm #
I ran into this same problem with mt-comments.cgi (on Superuser) a while ago.
What lessened the load a bit was renaming the file and changing mt.cfg to point to the new name.
Posted 24 Apr 2006 at 8:13pm #
Unfortunately, changing the location for mt-tb.cgi would result in duplicates of all articles re-pinging the original articles. Since there's no real "find/replace" in MySQL databases, I'm not even sure how I could re-set the old "Pings Already Sent" to avoid that problem.
Posted 25 Apr 2006 at 3:38am #
I would have also suggested a change in the TrackBack script and use of something like the DisguiseTrackBackURL plugin, although I didn't even think about the re-pinging problem. Are you sure that that is the case and that Movable Type doesn't handle that automatically (since it knows both the old and the new TrackBackScript name?
Anyway, if not, MySQL natively supports search/replace. I would also strongly suggest that you moderate ALL TrackBacks as this will eliminate any externally-initiated rebuilding processes, lowering your load.
I don't use the Akismet plugin myself (SpamLookup works great for me), but it would be very interesting to find out whether it takes a long time to respond or not. If the overhead or latency is high, then you'll have TrackBack script CGI processes stacking up and increasing your load. Did you have this problem before the Akismet plugin?
Posted 25 Apr 2006 at 7:55am #
DisguiseTrackbackURL will do nothing to help. Plus it was "tested with 3.0" and is version number 0.5 - not something I'm going to trust with this installation.
Jay, you know what I mean re: search and replace. I cannot find every instance of "http://thesandtrap.com/cgi-bin/mt-tb" and replace it with "http://thesandtrap.com/cgi-bin/something-else" while retaining all the stuff that comes before and after that segment.
The problem existed well before the Akismet plugin was used. SpamLookup wasn't that fast either.
Posted 25 Apr 2006 at 5:38pm #
I feel strangely obligated to suggest a switch to a different blog platform.
Posted 25 Apr 2006 at 5:40pm #
Won't do you any good Randy. It's not worth the time I'd have to invest in getting it going at a comparable level.
Posted 26 Apr 2006 at 8:36am #
After yesterday's issue with mt-tb.cgi, I moved The Sand Trap to its own server. And I've renamed the TrackBack script. For now, I'd rather just leave MT thinking it's mt-tb.cgi, let TrackSpammers get 404s, and fix the entry's "Successful Pings"...
Posted 26 Apr 2006 at 1:49pm #
Ya, I know 🙂 It just seems that whenever somebody blogs about a problem with their blogging software, some jackass chimes up in the comments about switching to different software 🙂