Support

Admin Tools

#14499 100% cpu loading, am I being hacked?

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 07 January 2013 08:25 CST

user6558

Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? No
Joomla! version: (2.5)
PHP version: (5)
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: (unknown)

Description of my issue:

I have a  j2.5 site with about 4000 articles with jreview, and only 1000 visitors a day. I just migrated to a powerful cloud server with 6 core vCPU and 8GB RAM. the server should be more than enough to run the site. I have also installed admin tools pro.

First of all, for such small site, the cpu loading is always high (average over 50% usage), and it would get nearly 100% cpu loading if I enabled joomla default sef, which the mysql process cpu usage will jump from 5% to 100%, and so I am forced to disable sef. 

Yesterday, my server's resource (all 6 core vCPU and RAM) suddently overloaded for no reason, and I captured the cpu info as you can see from the screenshot attached. I check that there is only 10 online users at that moment, and I really don't know what caused that.

I run the netstat -n | grep :80 |wc -1 in server, it's only 40 connections. 

I then put the joomla site in offline mode, then cpu usage drop to 5%. If I put back the site to online mode, the cpu will be back to 100% usage nearly at once.

Finally the server stop responding, and I had to reboot it. until now the cpu loading still high, and sometime also reached 100% usage for a while, then back to 50% usage.

I checked and checked for everything I know, and the only things I found suspicious is that my site got a few suspicious login users that I believe they are not real users, but registered and logined via script. (I would del them if I saw these users online)

I checked the apached error log, and see a lot error like:

[Fri Dec 28 11:04:55 2012] [error] [client 66.249.77.149] File does not exist: /var/www/vhosts/mysite/httpdocs/xxxxx

[warn] [client 112.120.19.6] mod_fcgid: stderr: PHP Catchable fatal error:  Object of class stdClass could not be converted to string in /var/www/vhosts/mysite/httpdocs/plugins/system/debug/debug.php on line 303,

I am really stuck, and don't know what is wrong. since the top command shows nothing about what php script is using so much cpu, I just can't trace to the root of the problem to find out if this is caused by my installed joomla scription or being hacked.

Any advise will be very much appreciated.

 

nicholas
Akeeba Staff
Manager

Judging by the top screenshot it seems that something in your Joomla! site (a plugin?) is consuming a hell of a lot of CPU. I'd recommend turning off plugins one by one. Within 20-40 seconds of disabling the problem plugin you'll see the CPU usage drop dramatically.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user6558

I found that the 100% cpu usage is caused by RewriteEngine On in .htaccess. when RewriteEngine Off, cpu will drop from 100% to 5%. why would RewriteEngine On create such high cpu usage?

user6558

My joomla sef and rewrite setting is set to off, and via admin tool pro, I just want to redirect mysite.com/index.php to mysite.com and redirect non-www to www.mysite.com

nicholas
Akeeba Staff
Manager

If you set RewriteEngine Off then you can no longer do any kind of redirection. Remember, you are turning the redirection engine off.

That said, I consider it extremely strange that setting RewriteEngine On would cause a 100% CPU use. This sounds like a bad server configuration or a misbehaving SEO extension installed in Joomla!. In the latter case I would suspect any extension which produces a custom 404 page.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user6558

To troubleshoot the RewriteEngine On CPU overload issue, I did the following but issue still remains:

1. I move the site to a totally different server

2. I upgrade J.15 to J2.5 with all extension reinstall  

3. I did not install any seo extension

everything is new, but some of the DB tables from jreview. issue still not resolved. this is really killing me, and the jrevew developer has no idea too. what else should I try?

nicholas
Akeeba Staff
Manager

Apparently one of the plugins you are using has a problem when you have RewriteEngine turned on. Which one? There's only one way to find out: start disabling them one by one to see which one causes the issue.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!