One of my sites is built using CakePHP and over the last few days it has been experiencing a shortage of memory and then my whole server crashes. It appears that some processes are not quitting and they are building up throughout the day, exhausting memory.
I am on a dedicated server and my host (Hostgator) say that it is adequate. It is my script that needs tuning. Here is some of the information from Hostgator following the crashes:
----
"There appear to have been a large number of long running queries. The began to stack up waiting for previous queries to finish executing. The caused the server to commit more and more memory until the it began to swap. Eventually the server's swap filled up and it exhausted its memory capacity. I have included the following output from the server for your review:"
"We apologize for the ongoing inconvenience. The server appears to have been unresponsive as a result of an overwhelming number of PHP processes under the (hiding-name) account"
"Thank you for contacting HostGator support. I went through the logs just before from last 3 days and found that the main reason for the server loading going up was because of the cakePHP application hidingwebsitename.com. It seems that further tuning maybe needed. It maybe a good idea to point your webdeveloper towards caching solutions for CakePHP as per the article below:
[login to view URL]"
"After doing some investigating I found the server simply run out of memory after seeing a sudden bump in traffic. The the user using the most resources is hidingname with [login to view URL] and [login to view URL] being the most popular sites under that user. There was a build up of processes which started around 14:22:36 CST, after the processes began to query the MySQL server there became a surge of IO which further compounded the situation and eventually its demise at 14:46:26 CST the server had already used up all of its RAM and swap space leaving it with no memory to do anything else.
"You may want to consider put a [login to view URL] file in place with the craw-delay directive to slow the crawl rates of some the bots. You may chose to block some bots if you notice they continue to be a problem. Here are some links about governing bots:
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]"
---
If you can address this please tell me what you'll do and also send a PM. I'll then provide the website name. I would need someone to work on this ASAP.
I will also provide the logs that hostgator provided and which I removed from the above responses as I don't want to publicly reveal my website name.
Do not send me your CV - just tell me exactly what you can do and how (if applicable) you've done that in the past. Understanding the problem is key. This is a customized script from Agriya.
Thanks
Hi, I'm an experienced system administrator, have experience with Linux and Windows server. I hold RHCE since 2009. Ready to finish this job. Thank you.