Apache seems to have no control over how much memory it reserves. In MPM prefork you control the maximum number of processes you want to allow, but whatever number you use there, there is always a risk that existing processes will require more memory than physically available. If the condition requiring high memory does not change, the OOM killer will start killing random Apache processes without solving anything and Apache will keep creating new processes, crashing the server. So two questions:
Shouldn't Apache control how much memory it assigns?
Isn't there a way to prevent Apache from creating new processes if there is no more memory available regardless of MaxClients or ServerLimit?
If not, can anyone confirm if nginx has the same risk? Seems to me that nginx won't fire the OOM-Killer to a crash point as easily as apache, because I've read it has a small number of running processes, and a more or less stable memory consumption. What I don't know here is if nginx has the ability to stop creating threads once the memory has been exhausted, and just queue those request until there is more memory.
For those who downvoted the question: The research effort was done, but it suggested the answers to the questions 1 and 2 where exactly as pointed out by womble's comment: yes to question #1, and no to question #2. Maybe these answers were too obvious to many people, but I found them hard to believe so I decided to ask them here.