« Wilshire Landmark Concrete Pour | Main | The Truth Is... »

Rebuild Problems

This blog seems to be having some problems when rebuilding. I'll use this entry as a test. It seems to be related to the MTMostVisited plugin with some of the latest log files. (Old logfiles work okay, but the latest one has a problem.) I believe that it is related to a number of very long lines in the log files, which seem to look like buffer-overrun attacks on a WebDAV protocol (SEARCH). My webserver isn't vulnerable, but it is adding it to the log. Apache::ParseLog doesn't seem to be handling it correctly.

My solution is to run a little Perl script that cleans up the logs. This is kind of a workaround: It doesn't really prevent it from happening, and the server does not correct itself if it did. (Maybe I should "cron" the clean-up script or something.) A better solution would be to fix Apache::ParseLog so it doesn't give out when the goin' gets rough.

The script itself is very simple, and could even be condensed down to one line. (Note: I need to work on a better way of formatting code.)

#!/usr/bin/perl -w -i.bak

# Deletes lines longer than a specified amount

my $longest = "";
my $maxlen = 2000;
my $badlines = 0;

while (<>) {
if (length($_) > $maxlen) {
} else {
print STDERR "Bad lines = $badlines\n";



TrackBack URL for this entry:


I'll test the comment rebuild section out again.

nice blog...:)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)