August 31, 2006

So Fresh and So Clean

One really needs to be on the ball to maintain one's website. I have been lax for the past several months, only casually checking for published spam in my comments. So when I really buckled down yesterday to get things in shape, I encountered a number of frustrating stumbling blocks.

The removal of the published spam was the first issue to contend with. Upon logging in, I was greeted with nearly 9000 comments, about 8500 of which were junk. This is pretty straight forward. I can remove about 1000 of them at a time, and just need to make sure I don't delete any REAL ones. Because I had kept up my spam-removal when I was actually actively posting, I just deleted them all past a certain point.

Then I decided to figure out a new way to avoid all of these unwanted comments. Because most of the spam gets posted to older comments, I figured if I closed comments on all the entries from further than a month back, that should take care of it. This worked, but what was involved in doing so took WAY too long. Basically, I had to go into each individual entry (over 400) and uncheck the "Allow Comments" boxes. I knew of a script that can be used with Movable Type to do this automatically, but I was *ahem* at work unable to access my ftp (I have figured out a way to do this online, as of today!).

As much of a pain in the ass that was, it couldn't contend with the next fiasco. Movable Type has two comments folders -- one is for the published and questionable comments, and the other set includes comments that have been filtered as junk. Now, I setup the blog to automatically delete the junk comments after 5 days. Unfortunately, I was not aware of a specific action one needs to take to trigger this cron job. So I had to contend with 136,000+ junk comments.

I had to sit and brace myself for a moment before trying to tackle something that large.

So I got started. 1000 at a time just wasn't going to cut it, so I tried to set it to delete 5000 at a time. This worked -- veeeerrrryyyyy sllloooooooowwwlyyyyy. And the scripts would hang. And I would have a nervous breakdown and throw the mouse at my cubicle wall um, room. Wait, that didn't happen. So anyways, I quit. I knew I'd return to it eventually, but I didn't want to have anymore to do with it at the time.

So this morning I decide to post a link to the Elsewhere column, but something is wiggy. My page won't load. The template's all jacked. Entries aren't appearing as they're supposed to. Again, I have a nervous breakdown, cuss out the internet gods and throw my monitor at the nearest passing co-worker sibling. Wait, that didn't happen, either.

After a deep breath I decide to check my server stats, and I learn that my disk usage is over the limit. Somehow I'm using over a Gig of space. So I call my lovely hosting company, and they promptly offer to raise my disk space by a couple of Gigs so I can work out my issues without having my site down. Go them! Within a few seconds my site was back to normal.

Shortly thereafter I'm navigating through my cPanel and take a look at the disk usage itemizations. Two files in my Movable Type folder are VERY large (over 100 and 400 Megs, respectively) - and they are (dun dun duuuuun!) CORE FILES!! Thanks to my wonderful, gorgeous and brilliant genius-boyfriend Erik, I discover these are files that result from core dumps, which are usually triggered by a system crash.

Upon further investigation I discover that I can simply delete these files, as you only really need to keep them if you're some Perl programmer and want to geek-out by trying to debug, and need them as a reference. With my system being all healthy again, I decide to try to re-tackle the junk comments deletions. I lower it to about 1000 at a time, and figure it's just going to be taxing. I get their numbers down to about 33000, and decide I want to take lunch...ummm...

Anyways, I try to perform the action that triggers the Auto-Delete, thinking maybe it won't hang with 100,000 fewer comments, and - TA-DAH - it worked! At that point I figure all is well with the world again. And everything is. Well, except that whole global warming thing - and all the wars going on - and the starving children - and our current administration... I could go on, but what's IMPORTANT is that MY site is fine, my junk comment problem seems to have been alleviated, and my boyfriend is awesome. Go me! *wink*


posted by julie at August 31, 2006 04:45 PM


BROWSE THE COMPLETE ARCHIVES, OR BY CATEGORY: JOURNAL | GEEKFEST | TRAVELOGUE | RECENT MOVIES | RECENT MUSIC | RECENT BOOKS | MOVIES | MUSIC | THE WORLD | MINI | LINK-O-RAMA | POP CULTURE | THEME THURSDAY | FRIDAY FIVE | PHOTO FRIDAY | PHOTOS | ELSEWHERE | OLD BLOG