MainPersonal InfoInterestsRandom FactsJournal
08 Jun 2004
A Close Call

All right, better document this somewhere. And what's a better place to do just that than a blog, right? A friendly warning, though: if you're not into technical stuff, you can safely skip this entry.

About an hour ago the Apache webserver on our Linux went down. Alertra immediately notified me via SMS because that's what it was supposed to do. It's just that there were times it reported the website was down, except that it wasn't. So lesson #1 in being a webmaster: never ignore such monitoring tool, no matter how many false alarms it has given you. I'm not a good webmaster, so I did just that -- ignore it.

Anyway, when I -- finally -- found out that the webserver was indeed, well, down, I encountered this funky error when trying to restart Apache:
Tue Jun 08 00:49:50 2004] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

Which I didn't buy for one single second because df told me otherwise. C'mon, having at least 10GB of free space on every mount-point hardly means no space left.

So I -- as I always do in times of trouble -- turned to my best bet: Google. You didn't expect me to put a hyperlink there, did you, everyone knows Google. Anyway, to cut it short, a few clicks later I found out that it was a known problem with Apache on Linux. Without going into details, which I don't really understand anyway, it has something to do with semaphores not being released.

Using
ipcs -s | grep apache
or
ipcs -s | grep nobody (if Apache is run by nobody)
tells you just that.

Here's how we remove those semaphores:
ipcrm sem `ipcs -s | grep apache | cut -d' ' -f2`
Which worked very well for me. A few other sites suggest another way:
ipcs -s | grep apache | perl -e 'while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
Which I didn't try. Simply because it confused me more.

BTW, semaphore. Does anyone else think of Boy Scout days upon hearing that word? Just me? All right.

Oh, oh, one more thing. Lesson #2 in being a webmaster: never postpone fixing your home puter or internet connection. What happened to me was really a close call. About midnight yesterday my puter started acting eccentricly. Suddenly I couldn't connect to the network. Any network! I couldn't even ping the puter in the next room. Having wasted a few precious hours trying to fix it, I finally gave up and re-formatted the HD. I nearly postponed it because I had other things. And because I was lazy, but that one goes without saying. In my defense, though, you know how long and painful a process re-installing your Windows is, don't you?

Speaking of which, here's a joke. Some people say if you play a Windows XP CD backward, you'll hear satanic verses. Well, that's nothing. Play it forward and it installs Windows XP!

Had I not suddenly become a hardworking fellow and decided there and then to boldly install my Windows XP Pro -- original, how 'bout that -- I would've been left helpless. And my boss would've killed me. With a candlestick. In the library. All right, he wouldn't have, but still. So, my dear friends, while procrastinating is fun, doing it at the wrong time might get you killed. With a candlestick. In the library. And don't bet the butler did it.

Posted by at 12:43 AM WIB
Post a Comment

(sorry, it's the spam)