My Ubuntu web servers were killing processes due to low free memory. I would prefer them to slow down than to kill processes. So I added SWAP disk space that is not setup by default in the EC2 instances.
Amazon AWS EC2 Ubuntu 11 or 12 instance.
This may work on other Linux versions, but I have only used it on Ubuntu.