December 30, 2003

CT Housecleaning

Another slow day at work allowed me to do some CustomTacos administrative housecleaning and stuff. Gotta love "...and stuff...". I found some really good advice on a forum somewhere that suggested some security precautions that I take to protect my server. See, this server is all me. I mean, I've got the ServerMatrix people watching my back in case someone breaks in (I think), but they're not actively checking my server for security holes. It's up to me. And it's kinda fun, actually. I patched up some possible security holes, turned off remote root login, and a bunch of other stuff that I can't write here because..well, it would defeat the purpose.

Tonight, I investigated why it seems like so many http requests are failing on the site. Lately, it seems like every page I load has at least 1 or 2 missing images...or the page doesn't load at all. It turns out that my watchdog senses were right on. Here's the skinny: I looked in my Apache error_log and found a recurring error that was pretty non-descript. A quick Google search on the error message told me that Apache was having trouble writing to a log file because it had gotten too big (2gb is the limit, apparently). Funny that it continued writing to a log file to tell me that a log file had gotten too big. That log file itself had grown to an enormous 75MB. After some searching around on my server, I found the offending log file. It was an error log for CustomTacos that was just over the 2gb limit. Weird. So, I removed the file and restarted Apache. All fixed.

But...why would that error log have grown so HUGE? There had to be a reason. I tweaked my log rotator script to rotate that log more often and then began watching the error log to watch the errors in real time as they were happening. I began seeing the same couple of files appearing in the error file. To make a long story short, I had forgotten a "/" in two lines in my include file for the entire site, so EVERY PAGE was generating 2 error lines for a file that Apache couldn't find. I left the live error log scrolling and went and fixed the error. When I came back, the scrolling had stopped. Pretty neat. I cleaned up a few more offending files and felt confident that my error log shouldn't grow that large again.

I swear, this could be a full-time job.

Posted by Jeff at December 30, 2003 12:54 AM
Comments

Kickass. Don't you love tracking down problems and fixing them?! Instant gratification. :)

Posted by: Eric at December 30, 2003 12:50 PM

Wow...you're so smart :)

Posted by: Olivia at December 30, 2003 03:57 PM
Post a comment









Remember personal info?







© 2007 Jeff Pollard