Problem with high CPU usage causes website inactivity

Hi,

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 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.

Hi BarkerJr, thanks for your reply.

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: http://www.google.com/search?q=cpu+high … ion+centos">http://www.google.com/search?q=cpu+high+utilization+centos

Seems there is a bug reported at CentOS, too: http://bugs.centos.org/view.php?id=1174

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.

Whatever bug the official kernel from CentOS might have, you're probably not using the CentOS kernel at all – unless you have an elaborate pv-grub setup rather than the default Linode kernel.

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.

hybinet, thanks for the suggestion. I'll try to do that.

I am sure the problem is caused by a inapropriate server configuration probably in MySQL …

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct