My article site is running on a vps and recently the site cannot be accessed and it goes down daily. It is using alot of memory according to the hostgator support whenever customer clicks on a page.
I need a php programmer to analyze whether it can be made to run more efficiently and fix the scripts that is causing my site to go down daily. Both php and mysql are using a considerable amount of resources on even one page refresh. The site always go down whenever a file cannot be accessed. cpanel error log: ( File does not exist: /home/articles/public_html/css/images, referer: [url removed, login to view]). It looks as though much of the processing and resource usage is happening when the file ./templates/[url removed, login to view] is being called, and then quite a few SQL queries are made without much in the way of limiting parameters.
Hostgator support says:
from the logs it appears that your VPS is running out of memory. Specifically the high memory usage can be traced to the script running under the articles account. It is using close to 200mb per process which is very high considering you have 768MB total for your plan. We have adjusted the php memory limit to 64mb to try to bring memory usage down for this script so that it doesn't crash apache at least. Do you have any caching addons enabled for this script that could be activated so that each page doesn't have to be processed by the PHP engine? You have a lot of those errors then apache goes down
1. need to check your php code and optimize, same goes for the databases.
2. caching mechanism for the scripts.