Setting memory limits for apache threads?

Hi All

Recently we've had a few problems with a clueless customer mistaking (ahem) our server for his test-environment and executing PHP-scripts that would send Apache to it's knees in a few minutes (+500 MB RAM usage for a single thread) and almost take the entire server down with it - even Linux runs like crap with 6 KB available RAM+swap space....! ;-)

We've hit the customer several times with a heavy cluebat and while it may have worked, we're still left with a nasty problem that is more than likely to occur again.

Has anyone found a solution to this? Google turns up zip as far as I can tell. I know of mod_throttle (we run Apache 1.3.28 on RedHat 7.1 and ES 2.1) but that is not usable in this case since there is no traffic involved - just heavy memory usage. Are there any monitoring solutions that will react to an extreme increase in memory usage and kill the offending thread (or something like that)?

Of course we could parse the output of "ps -aux" every 10 seconds and take it from there with a script but I'm afraid that it might create quite a load on the server, and I really woul dlike something more robust and tested - if it's out there...

 

 

 

 

Top