Problem with high CPU usage causes website inactivity
I have a Linode 540 service since a couple of months. It is a CentOS box that runs LAMP stack.
Now I am experimenting a strange problem that only happens sometimes. I don't have huge volume of traffic, about 1500 unique visits per day, so that should not be a problem, I think.
But I noticed sometimes the site don't load properly and it keep just loading without giving any other message, until I need to reset the server and start again.
I tried to see the logs: /var/log/messages and mysqld.log for example, but I did not notice any strange problem or at least I could not identify it.
However, by looking the Linode charts, I noticed there are high CPU activity when that happens.
Anyone could advice which files should I see to detect what is causing that CPU peaks?
I guess it could be something with MySQL tuning but not 100% sure.
(as reference, the site is running a WordPress installation)
Any help is appreciated in advance.
Julian
4 Replies
I ran TOP, however that problem happens suddenly and usually I am not 24hs. connected to the server looking the output of TOP.
I saw many people seems to have the same problem, so now I am wondering if that could be caused by the kernel version. Just looking here:
Seems there is a bug reported at CentOS, too:
I hoped probably there is a way to get alarms about what process is causing that high CPU utilization.
Still looking for a solution, thanks.
@BarkerJr:
I don't think there's any particular file, but you could use the command "top" to see what is using the CPU at this moment.
On the other hand, this could be a plain old out-of-memory event, which sometimes happens in memory-limited VPSs with inappropriate Apache + PHP configurations. Install something like Munin to monitor your memory usage over time. If you see memory usage spiking too, then the problem is almost certainly with your server configuration.
I am sure the problem is caused by a inapropriate server configuration probably in MySQL …