I have an apache server that runs some binary CGI programs. Those programs behave nicely most of the time, but on rare occasions they gult up all the RAM, or run for a very long time, taking 100% cpu.
When that happens, it becomes very hard to SSH to that machine (it's CentOS, BTW) and manually fix things.
Is there a way to have apache execute the CGI binraries with "nice" priority ? I don't want to limit the RAM usage or the CPU resources.
It's my understanding the having a "nice" priority will allow me to SSH to the machine (since sshd will have higher priority), and also, if RAM becomes an issue, the OOM killer will kill the CGI binary first.
Any ideas ?