My webserver is giving me some problems in the last two months, it is freezing randomly, one time per day, and maybe sometimes it works fine for more days but then it goes down again.
The server runs one website, and it also has some cron jobs to send email notifications, generate sitemap, and generate website statisthics. The entire project uses YiiFramework and we are running php scripts from console, as I said, configured as cron jobs.
The sitemap and stathistics commands use a lot of resources, but they are configured to be done step by step, so the first cron job generates 10.000 links, the second generates another 10.000 and so on until it finishes. Same with the stathistics command, it does a lot of checks inserts on the MySQL database.
So what I want to find out if are we dealing is caused by bad written php code or sql commands, or is it something else, like a bug in a service or a hardware problem.
You can see here the logs of the server:
/var/log/messages just before I have restarted the server:
Console messages that started to come in when the server started to hangup:
BUG: soft lockup - CPU#7 stuck for 10s! [php:756]
Pid: 756, comm: php Not tainted 2.6.18-194.26.1.el5 #1
More here: http://pastebin.com/gsbK8JdN (1)
Someone who already saw the messages suggested that it could be bad hardware CPU/RAM, but the hosting company won't change anything saying their server is ok, and that I should reinstall the OS.
We are talking about a dedicated server with 12 CPU and 16GB of RAM. Let me know if you need me to provide more info about the hardware.
Thanks in advance!