MyBB Community Forums

Full Version: HTTPD service was down due to high CPU resource usage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

My site: http://worldofdth.com
Recently my site goes due to HTTPD service was down due to high CPU resource usage as per the webhsot.
Here is the reply from my host about this downtime:

Quote:Hello,

The issue has been fixed and your websites are loading fine now. The issue occurred as HTTPD service was down due to high CPU resource usage. We have noticed that the domain "worldofdth.com" is causing load and taking large amount of RAM also. For your clarification please go through the log below.

~~~~~~~~~~~~~~~~~~~~~
[root@server vhosts]# top -cd3
top - 01:28:21 up 3:02, 1 user, load average: 12.92, 3.89, 1.86
Tasks: 28 total, 2 running, 24 sleeping, 0 stopped, 2 zombie
Cpu(s): 29.6%us, 7.7%sy, 0.0%ni, 0.0%id, 62.7%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 786432k total, 346944k used, 439488k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11353 mysql 15 0 417m 93m 7732 S 0.3 12.2 4:47.13 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib6
30154 tambersa 18 0 170m 31m 6644 D 1.3 4.1 0:00.20 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30162 tambersa 19 0 162m 22m 6796 D 3.8 3.0 0:00.12 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30142 tambersa 15 0 161m 22m 6740 S 0.3 3.0 0:00.12 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30095 tambersa 15 0 161m 22m 6740 S 0.0 2.9 0:00.11 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30160 tambersa 15 0 161m 22m 6736 S 3.8 2.9 0:00.12 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30145 tambersa 15 0 161m 22m 6740 S 0.0 2.9 0:00.10 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30148 tambersa 16 0 161m 22m 6732 S 0.0 2.9 0:00.11 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30147 tambersa 16 0 161m 22m 6732 S 0.0 2.9 0:00.09 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30153 tambersa 15 0 161m 22m 6688 S 0.0 2.9 0:00.11 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30144 tambersa 15 0 161m 22m 6656 S 0.0 2.9 0:00.12 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
30141 tambersa 15 0 161m 22m 6724 S 0.0 2.9 0:00.10 /usr/bin/php-cgi -c /var/www/vhosts/worldofdth.com/etc/php.ini
~~~~~~~~~~~~~~~~~~~~

You need to optimize your website codes and SQL queries of the database at the developer end. Also, you should check your code to see if you are closing the connections correctly. The connections can also be there because you use pooling, so the system can reuse exist connections.

Also you can do the general optimizations as below :

1) long-running process on MySQL

Please do a query level optimization to avoid long running quires

i) http://dev.mysql.com/doc/refman/5.0/en/kill.html
ii) http://rugmonster.org/2009/02/kill-mysql-procs/

2) large or complex query

i) http://www.mysqlperformanceblog.com/2007...x-queries/
ii) http://20bits.com/article/10-tips-for-op...-dont-suck

3) Adjust wp--cron for WordPress

We also recommend making your wp-cron.php script run as a normal scheduled task instead of on every page visit. Here are instructions on how to make this change "http://wp.tutsplus.com/articles/insights-into-wp-cron-an-introduction-to-scheduling-tasks-in-wordpress/".

4) Optimize database using phpMyAdmin

http://support.hostgator.com/articles/sp...phpmyadmin

5) Do proper indexing on tables

i) http://stackoverflow.com/questions/1108/...exing-work
ii) http://www.developer.com/print.php/3667831

Now how can i do above things that they mentioned to avoid future downtimes......
What plugins do you have enabled? A lot of the time the CPU usage is from plugins, as they require (some) another request to MySQL (which if you have a lot of views in a minute will be extremely high, if you use a lot of plugins).
yes I am using a number of plugins......
(2013-11-20, 02:14 AM)saini1987 Wrote: [ -> ]yes I am using a number of plugins......

You didn't answer the question:
(2013-11-19, 11:42 PM)KnownSyntax Wrote: [ -> ]What plugins do you have enabled?]