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) {
$badlines++;
} else {
print;
}
}
print STDERR "Bad lines = $badlines\n";
Comments
I'll test the comment rebuild section out again.
Posted by: Jeff | April 11, 2004 08:02 AM
nice blog...:)
Posted by: abhi | April 25, 2004 10:59 AM