I'm a web designer by trade who develops using php and mysql. I have this wordpress-powered website running alone on a dedicated server (centOS 5.7, php5.3.8 + APC , Apache 2.2, mysql 5.1 - hardware: intel celeron 2.8Ghz, 2go RAM). I manage the server via cPanel WHM. I've installed munin to visually view the strain on each
In terms of traffic: its always around 10 to (max) 50 concurrent users, average around 20.
Every day, the server crashes once. I fail to find the problem. I would need some guidance in order to understand why exactly the server resources go 100% which leaves me no other choice than to hard-reboot.
SYMPTOM DESCRIPTION
"Crash" = server becomes unresponsive, munin tells me: cpu = 100%, ram=100%, swap=100%.
The crash happens every day but not at the same time. The server is brand new, we only have it since one month and it's taking the real traffic only since December 5th (DNS redirection happened on November 28th, then some advertising occured on monday). Since Dec 5th, it crashed once or twice a day. I found out page caching by a Wordpress plugin (W3 Total Cache) was not working correctly and it seemed to solve the problem. Then it crashed yesterday (6 Dec) after i desactivated it.
Today it crashed twice. But i noticed in the error_log there were still requests for W3 total Cache object-cache.php so i completely deleted the plugin 's files.
The Munin graphs show that it happens very fast. Everything is ok (cpu, ram, swap) for hours, then all of a sudden memory, cpu and swap rise at the same time. Unfortunately munin does not give access to the exact list of processes that would provoke the spike.
How do you audit a failing LAMP system? What steps should i take?
Thank you for your advises. I realise i'm beyond my field of expertise, but i really do enjoy the few things i've learned to do so far via ssh and i'd like to know more from real experts, what to do in such situations. Knowledge never hurts and will probably help me produce better php code.
/var/log/messagesand/var/log/syslog? – Khaled Dec 7 '11 at 12:45