Akismet Update and Server Problems

After mon­it­or­ing the com­ments that Akismet blocked very care­fully, I can report that I’ve had no false pos­it­ives for nearly a week. I’m not quite sure what changed to fix things.
With a dynamic sys­tem like Akismet, things will change over time. That is the nature of the beast. I don’t know whether Matt and the crew tweaked some­thing, or whether a con­cer­ted pois­on­ing attempt stopped being effect­ive, but I’m glad I can start trust­ing it again.
I sus­pect it was the former because the change back was very dra­matic, though I’m sure Auto­mat­tic would not want to admit to it.

Server Trouble

In the mean­time, at around one this morn­ing, my server went down, or rather my blog stopped work­ing. After a quick invest­ig­a­tion, I determ­ined that the data­base server was com­plain­ing of too many con­nec­tions. I checked and there were a large num­ber of httpd pro­cesses run­ning. Pre­sum­ably each, or most had a data­base con­nec­tion open. Static files were being served ok, but any­thing involving the data­base was failing.

I restar­ted the Apache and that seemed to cure it. I star­ted check­ing through log files to see if I could determ­ine the cul­prit, but found noth­ing sus­pi­cious. Fif­teen minutes later the site was down again. I then spent the next two hours mon­it­or­ing the situ­ation. A quick script allowed me to watch the pro­cess count:

ps -ef | grep httpd | wc -l

It was grow­ing quite rap­idly from an ini­tial 16 to over 100, though the site would start fail­ing at about 80. In the end I gave up when the pro­cess count stayed stable for 20 minutes. Though when I checked after a few hours sleep, it had gone down again and was down for over 5 hours. I’m pre­sum­ing it was an attack of some kind.
It has since gone down again, but the growth in num­ber of pro­cesses seems to take a much longer time. I didn’t find any­thing obvi­ous in the logs that I checked, but maybe it is one of the lesser sites which is being attacked. I will con­tinue to investigate…

13 thoughts on “Akismet Update and Server Problems

  1. I’ve had sim­ilar prob­lems on my server for quite a while. Some­times I get these bursts of con­nec­tions that would grind my server to a halt. I even­tu­ally mod­i­fied my apache con­fig­ur­a­tion to limit the max­imum num­ber of run­ning serv­ers, until I found a level that the box seems to be able to handle.

  2. In the past week noth­ing has changed on the algorithim side, so it might just have been that the sys­tem finally learned to identify the strain of spam and ham you were get­ting after it got more data. Spam is a lot like a virus and as new strains pop up it can take some time (any­where from 2 – 10 com­ments) for it to be iden­ti­fied and squashed.

  3. Mike,
    I’m work­ing on a web­site and using your journ­al­ized winter theme, real cool! How do I set up the right column so I upload links from the admin screen in WordPress.

    If I use the clas­sic theme, I can upload links through the admin screen, but with your theme, they do not show up.

    Thanks,
    Mike

  4. Mike, con­sider run­ning a cron job such as

    kil­lall –HUP httpd
    httpd

    This will peri­od­ic­ally dis­able your Web dae­mons for a few mil­li­seconds and restart a single ses­sion. Choose fre­quency in accord­ance with server strain.

  5. Hi Roy,
    That’s a good idea but it would be much ‘cleaner’ to use the proper start up script to do some­thing like that. In my case

    /etc/init.d/httpd restart

    But I’d still rather do that only hav­ing detec­ted some­thing wrong like too many connections

    Mike

  6. I assume that restart­ing httpd will send a sig­nal to one or all of the exist­ing dae­mons. Why not add a con­di­tional state­ment (e.g. ps –ef | grep httpd | wc –l > 2). Noth­ing to lose here… if the state is mor­bid, kil­lall –HUP httpd; /etc/init.d/httpd restart; (if that’s the path in your distribution)

  7. Roy,
    It is the ‘kil­lall’ com­mand that I regard as not clean. For instance, I some­time run more than one web server on my machine. I wouldn’t want to kill all of them and only re-start one.

    The restart option for the apache start-up script will first stop the pro­cess it star­ted before start­ing another.

    Thus my cron script might look like

    if [ `ps -ef | grep httpd | wc -l` -gt "25" ]
    then /etc/init.d restart
    fi

    (I haven’t tried this, so the syn­tax might be wrong)

    Mike

  8. hey. i was won­der­ing what the deal with your photo gal­lery is. i’d really like one of my own and i love the format of yours. i just don’t know where to get started.

    help me?

  9. Indeed, I got the same attack at my web­log last week. I had to scramble and tone a lot of sys­tem ser­vices down, since the attacker hit my httpd, and it was con­figured with a max­cli­ents set­ting too high, caus­ing a load of over 266.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>