0

For a number of different reasons in the last year or two, I have had issues with servers that run processes which tend to cause very heavy load averages.

In these cases, I can often ping the server, but it becomes very unresponsive to any other connections, and I often have to power cycle the machine.

One reason for causing this huge load include a poorly configured Apache process on a virtual server that allowed too many concurrent connections for the hardware allocated to it, and I seem to have ran some programs on another server tonight that appears to have done something similar.

What I am curious about is linux has tools that detect a very large load average and interrupt those processes in some way, allowing the machine to recover from this?

My apologies if I have not worded this well, I appreciate it is pretty open-ended.

kaybenleroll
  • 369
  • 2
  • 5
  • 9
  • There couldn't possibly exist a tool to automatically recover from a high load average. A high load average is not itself a problem but it may be a symptom of an underlying problem. There is no such thing as automatically recovering from a symptom without first fixing the underlying problem. – kasperd Apr 18 '15 at 14:15

2 Answers2

5

It seems to me that you've answered your own question.

One reason for causing this huge load include a poorly configured Apache process on a virtual server...

If you have a poorly configured Apache server, fix that configuration. You've already done the investigation, so now you should implement the proper fix. A script to interrupt/restart/kill processes that runaway is only a workaround.

All that being said - I don't know of any tools that would do what you're looking for. But I don't think you need a tool, you need a proper configuration for the system you're working on.

baumgart
  • 2,483
  • 18
  • 17
1

baumgart is correct, that you should solve the problem. However as a work around, you can have monit execute scripts if the load average goes too high. It's something of a hack though, so it's far from perfect. You could also write something to do this relatively trivially.

Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
Cian
  • 5,838
  • 1
  • 28
  • 40