My site (which as running fine until yesterday - CPU was at 2%, memory at 50%) keeps maxing out the resources - CPU and Memory at 100% and "load" and Disc IO very high.
the site is a php (silverstripe) site running on Ubuntu linux with apache and mysql.
Looking at the memory:
ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n
I get 150 entries for apache2 all with 40-90Mb. plus 475Mb for mysql and 331Mb for Java.
So it seems apache is starting too many processes and eating all the resources. Is that right?
If I restart apache, the site comes back up and works fine for an hour or so and then builds up lots of apache entries in ps and crashes.
how can i configure apache to not use up all the resources and avoid the website crashing? How can I find out what is causing the site resources to max out?
Update:
#/etc/apache2/mods-enabled# cat mpm_prefork.conf
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 100
MaxConnectionsPerChild 0
</IfModule>
Phpinfo
https://gist.github.com/asecondwill/bd9640cae780fa87a3af05be335aa3fb