JOEHEWITT.COM

Thoughts on software and life.

Thursday March 31

750 MB

Today I discovered that the Movable Type database for this blog has a 750 MB comments database file.

Yes, that's right, I have THREE QUARTERS OF A GIGABYTE worth of comment spam!! I have been ignoring this problem for years, but I didn't realize how severe it had gotten.

Trying to clean up the database has been a huge headache. Ben Trott wasn't planning for this situation when he wrote Movable Type. Deleting the junk comments by hand won't work, since each post has over a thousand of them, and it takes anywhere from 5-10 minutes for MT to finish deleting 500 comments. I've tried to export to a text file, but Movable Type crashes around the point the file reaches 150 MB. Finally I managed to export them all by creating a special template and exporting each month separately, with a maximum of 65 comments per post. Now I have to write a script to parse the text files and throws out comments that are more than 30 days late, and then re-import the whole thing. Ugh.

To think, I could have saved all this trouble by just renaming mt-comments.cgi years ago like some people recommended. Ugh.

Update: I just deleted all of the comments. I backed them all up so someday if I'm feeling ambitious I'll reconstruct them.

at
Posting your comment. Please Wait...