|
Paul Makepeace > Inchoate > 2005 > 06 > Movable Type Maximum System Load news - contact - search |
Had the mother of all comment spam attacks today lasting several hours, and having had the machine crippled for most of that time (loads in excess of 160!) I at last resolved to do something about it: implement a MaxSystemLoad setting for Movable Type.
It was surprisingly straightforward, testimony to the reasonable clarity of the MT codebase. A call to Sys::Load to get the 1-minute load average, and a die during the early checks in MT::App->run if the MaxSystemLoad is exceeded. Easy.
Here's a patch: mt_maxsystemload.patch. This is against my own hacked 2.66x distro but ought to take against stock 2.66x.
Enjoy...
PS I'm going to watch to see what happens with this and consider putting a sleep 10; just before the die to tie up the spammers a while.
PPS Cunning how the spammers picked a time when I was having xrays in hospital and couldn't get SMS or GPRS to take action?
Posted by Paul Makepeace at June 29, 2005 16:48 | TrackBack