I m working on a PHP web application that let s users network with each other, book events, and message eachother. There s only about 100 users.
I set up the application on a VPS with Ubuntu 9.10, apache2, mysql 5 and php 5. I had 360 Mb of RAM, but upgraded to 720 MB.
Lately, my web application has been experiencing outages due to excessive memory usage. From what I can tell in error logs, it seems the server automatically kills apache processes that consume too much memory. As a result, I upgraded memory from 360 MB to 720 MB as a stop-gap measure.
So my question is, how do I go about resolving these outage issues? How do I know if my website s need for more memory is due to poor code or if it s part of the website s natural growth? What s the most efficient way to determine which PHP scripts consume the most memory?