index.php using 95% CPU

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
enigmaxtreme
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 109
Joined: Tue Jul 07, 2009 7:26 am

index.php using 95% CPU

Post by enigmaxtreme » Sun Dec 18, 2011 7:06 pm

All of a sudden our site was getting shut down by JustHost for excessive CPU usage this past week, we were suspended 3 times until we decided to move to a dedicated server with SingleHop and our index.php page is reporting a 95% CPU usage causing the site to run slowly/not at all, We haven't changed the index.php page in months and I don't know what to do?

Can someone give me any ideas on how to isolate the problem

User avatar
Z9iT
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Fri Oct 14, 2011 8:15 am
Contact:

Re: index.php using 95% CPU

Post by Z9iT » Tue Dec 20, 2011 6:42 pm

I hope you aren't using too much of java scripts or codes which calls for external content, Like a Google Analytics code / Google custom search engine code in a blank module. Try disabling all modules which calls for some external content.

Also check for any hidden codes in your index.php file, (you can compare it with the fresh instance of Joomla relevant yo your Joomla template & version).

Turning on debug from backend may provide you with some useful information.
Remember to turn debug mode off once you have finished.
http://z9it.com....Bringing the best of www, in a gist...

JLHC
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Thu Oct 16, 2008 9:21 am
Contact:

Re: index.php using 95% CPU

Post by JLHC » Tue Dec 20, 2011 8:36 pm

Usually this is not really related to the particular "index.php" page itself but the Joomla installation as a whole.

Did you install any modules/plugins/extensions recently? Are they added to your home page?
James Lee - 10+ Years Joomla Veteran • Cloud & Web Hosting Expert

Best Web Hosting for Joomla
Recommended by Cloud & Web Hosting Expert

lanac
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Dec 22, 2011 6:56 am
Contact:

Re: index.php using 95% CPU

Post by lanac » Thu Dec 22, 2011 7:02 am

As you are now on a dedicated server, you can use an opcode cache like APC, it should cool down your server a bit.
Try to make a "top" on the command line of the server to see exactly which process is taking that much CPU.
If it is mysql, you will have to analyse slow queries log !

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Tue Dec 27, 2011 5:16 pm

I kind ov have the same problem and my joomla website generates an incredible amount of guest sessions as an addition to this. Any ideas?What information will be useful to provide to troubleshoot the issue?

User avatar
johnnycage
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Mon Dec 26, 2011 7:20 pm

Re: index.php using 95% CPU

Post by johnnycage » Tue Dec 27, 2011 6:36 pm

Please put your website URL so we can take a look at it.

I had a problem like this before and it was:

Google Webmaster tools robot

I changed the update frequency of the bot (How many times between a period of time the robot should acess the web site) to 0.002 requests per second, so my web site was getting over heated, it was showing like 3000 visitors per minute in the Joomla Visitors counter. Then I moved the update to normal and it normalized.

Well, if your issue is with real visitors, so... LOL, put a lot of adsense, earn money with it, then get a Cloud server. B]
Venha divulgar seu site de graça: http://suachance.lucrebem.com.br

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Tue Dec 27, 2011 6:45 pm

Hm.. i get about 2000+ unique visitors a day. the hosting company told me the problem is in joomla/index.php - it loads slowly - about 0.41 - should load for about 0.05
google bot setting is set to recommended (0.2 requests per second and 5 seconds between requests)
according to WMT index.php takes on average 7.2 seconds to load! Impossible it was aobut 2-3 sec before

User avatar
johnnycage
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Mon Dec 26, 2011 7:20 pm

Re: index.php using 95% CPU

Post by johnnycage » Tue Dec 27, 2011 7:05 pm

Perhaps it's not the index itself, because the index is just the index, try to remember that other scripts are loaded too, some of them loads in every page.

What is your web site about?

Can you put here the URL?
Venha divulgar seu site de graça: http://suachance.lucrebem.com.br

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Tue Dec 27, 2011 7:08 pm

it is adult website i would not like to post the url here. yes i am aware it is not the index... is there option to pm here?

User avatar
Z9iT
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Fri Oct 14, 2011 8:15 am
Contact:

Re: index.php using 95% CPU

Post by Z9iT » Thu Dec 29, 2011 11:01 am

you can PM the website url, for its against the rules to put such web addresses on the forum here.
Have you verified if the actual visitors that Google Analytics show are same as your server stats program reflects???

I hope you must have tried disabling all the modules for once and see the page load? (as i said earlier)

As you said, its an adult_website, it must be having lots of videos and image. I would like to know which module you use to display images/videos. A good module might help to relax the page load.

Are you using gzip compression ?????

I suggest you one more alternative (which i think will help a ton, but still you can give it a try....),
use Akeeba backup to get a current backup of your website, unzip it upon any virtual LAMP server, I suggest turnkey linux ( http://www.turnkeylinux.org/joomla15 )
now upon this local copy of your website, try uninstalling (you should also delete their directories) modules, plugins, etc, etc one by one, and see what happens...
http://z9it.com....Bringing the best of www, in a gist...

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Thu Dec 29, 2011 7:33 pm

I moved the website to another server (better one) and the problems started. I have mobile joomla and it caused an error. The MJ suport told me what setting to change, so this could be fixed. I believe this problem is solved. But there is more. Do you know any way on how to totally disable rss for jomsocial? I do not use images/videos - only private messaging. index.php should execute for 0.03 - 0.05 but does not execute from 0.36 to 0.41. I have removed all unnecessary modules, plugins, etc. The ones that are disabled, I also uninstalled. Their order is fine, too. This website gets a lot of visitors, so might be just traffic. but i did not have this problem on the previous server. Maybe the database broke. Error logs don't show anything interesting, except the mobile joomla error that i fixed and sometimes a fatal php error about feeds (only when i tried to rip the feed scripts and codes from jomsocial but when i restored them, the errors do not appear again).

User avatar
Z9iT
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Fri Oct 14, 2011 8:15 am
Contact:

Re: index.php using 95% CPU

Post by Z9iT » Thu Dec 29, 2011 7:59 pm

if you are genuinely getting the web tragic, then it can be verified by comparing results from two diffrent analytic programs. One resides on server, like AWstats and other a third party, like Google analytics / Statcounter. Do add these in a blank module, preferably @ debug position.

Coming to joomsocial thing, just find their RSS plugin/module and unistall it... I think Joomsocial may respond you better.

Regarding that you said your database might have broken, I am not sure bout everything, but if you are on cPanel, it gives an option to repair database (option is under MySQL database).
http://z9it.com....Bringing the best of www, in a gist...

User avatar
Z9iT
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Fri Oct 14, 2011 8:15 am
Contact:

Re: index.php using 95% CPU

Post by Z9iT » Thu Dec 29, 2011 8:04 pm

There is also one last tedious job that you can do... however be wary that its really time consuming, and may not yield you the perfect results...

On a test environment, you can install a very fresh instance of joomla, and all your desired components.. then one by one, yo may start exporting database tables from your live website to this test env. I am not sure what exact tables you have to move for jomsocial. however concerning transfer of users i know the tables (they worked perfectly for me)....
I apologize that currently i dont remember which tables are those, but will surly let you know in a weeks time....

Remember that while exporting tables, dont forget to check
***Under "Structure" select "Drop Table" and deselect "If not exist"***

I strongly suggest you to wait for Joomla 2.5 to be released, and then do this migration... I suppose Joomla 2.5 is almost bout to release by few months, which will mark a fade down period of 1.5 & 1.7....
Wish you luck....
http://z9it.com....Bringing the best of www, in a gist...

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Thu Dec 29, 2011 8:19 pm

Thanks! I will do some testing and if I find solutions will post them here. :)

User avatar
Z9iT
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Fri Oct 14, 2011 8:15 am
Contact:

Re: index.php using 95% CPU

Post by Z9iT » Thu Dec 29, 2011 9:09 pm

I did some heavy scanning :geek: on the URL that you PM'd me....
and so far, everything appears to be clean.

I have found 1-2 error so far, just have a look at the attachment image....

also check whats this URL??? :eek:
http://your_domain.com/ICN%20BG%20-%20%D0%BF%D1%80%D0%BE%D1%84%D0%B5%D1%81%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D0%B5%D0%BD%20%D1%85%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B3%20%D0%B8%20%D0%B4%D0%BE%D0%BC%D0%B5%D0%B9%D0%BD%20%D0%B8%D0%BC%D0%B5%D0%BD%D0%B0
this loads with a 200 code and then gives a 404....

http://your_domain.com/hosting gives an 301, however i dont think this relates to your domain however the redirected domain is taking loadz of time to load........

your index page is loading pretty fast, atleast in here... :-[ ;)

I think all the above are general errors which seemingly dont relate to page loads...
You do not have the required permissions to view the files attached to this post.
http://z9it.com....Bringing the best of www, in a gist...

dunio
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Dec 14, 2011 3:59 pm

Re: index.php using 95% CPU

Post by dunio » Thu Dec 29, 2011 9:15 pm

well this is how i hide my hosting referal url so that others pay for my server (they purchase hosting plans I get lots of cash) I put the description of which host company I use and near it a url to mydomain.com/hosting and 301 redirect this url (mydomain.com/hosting) to my affiliate link in htaccess. How bad is that?

EDIT:
i can 301 redirect this link from the image (domain.../games/sexy-games) to just domain.../games because sexy games is just the category name. I use articles and embed flash games, so that some users could also have some fun. How bad is that?

Ehm?? What is it you are using to crawl the website again?

The index page with the problem is domain.com/home/index.php - this is the joomla index, the other index is the server public html root


Locked

Return to “Performance - Joomla! 1.5”