my domain http://technical.grasshoppernetwork.com is running with drupal 7.4 and is hosted in shared hosting in IIS 7.0 server with php 5 and mysql 4.
but the service provider send a snapshot displaying the resource utilization which shows PHP/CGI processes taking 29% of CPU.
They stopped the domain.
After requesting several times, the service provider agreed to allow the domain only if the problem is solved. I could not optimize it. So I put a simple html file in the wwwroot of my hosting space and took the actual druapl installation to a sub directory.
Now the current path is
http://www.grasshoppernetwork.com/Technical/Share/index.php
Can somebody please guide me why my scripts are consuming so much resources so badly?
Comments
Needs more information
There is little one can do without more information than that. So let's gather some data!
First set up a local environment with the site. Can you reproduce the problem there?
If not then there is a problem with your host and either you have them help you figure it out, or you switch hosting.
If the problem persist you need to profile the code. Install either XHProf or XDebug, load a page with them enabled and then check the results. Dig down through the reporting to see which calls are taking the most resources.
Is it custom code you can optimize? Is it contrib/core code you can optimize and patch? Then do that!
If it's something you can not easily optimize then it's time to look at caching. On a shared host your options are very limited, as opposed to with a VPS or dedicated machine. I guess the majority of your users are not logged in, so then using the fast page cache, with your database as backend, could really help the performance.
But try to reproduce the problem and profile your website before throwing caching solutions on it. Let us know what you find if you're having trouble making sense of it.
Here's something to help you get started: http://tinyurl.com/6a6yng9
Thanks for your reply
Here is what I have used.
1) Drupal 7.4 with some contributed modules.
2) Actually I have optimized the cache handling to maximum possible limit of my knowledge and the site had not had any problems for about a month!
3) Traffic is as low as probably 80 odd unique visitors daily.
4) I have developed the site right in the production environment. But as par your suggestion, got it installed locally. But as I can not test a traffic scenerio, I am really not able to find it.
5) I am sharing Some projects( Zip file), documents, and article+ blog
I have initialized HeadJs, Cache Manager. checked the site with YSlow, and looks quite optimized to me other than "entity tag and gZip issues.
I removed auto refresh and view slide show and even Rules. only 11 php scripts are active.
--------------------------------------------------
I have mentioned the changed path of the site everywhere possible. and now traffic is about 60 unique visitors daily. Problem is It is not giving any trouble what so ever when running from sub directory. It is the sub domain which is causing problem.
Even when I took the site to maintenance mode, CPU utilization is high and showing the high utilization in php/cgi processes.
If there is no visitors in the site, how come the Php scripts be so active?
I have a doubt here, could it be due to some possible hacking trials? or may be some third party scripts ?
In one month I have played with drupal like hell. Being a web developer for last 8 years, I know a few optimization things. But this issue is becoming a real funny.
-------------------------------------------------
PS: Should I mention the list of all the modules. Service provider has been pretty co-operative so far and I dont have any issues with their cooperation. They are suggesting to migrate to VPS hosting. For a site with 60-100 visitors, that is pretty unthinkable at this moment.
Any clue is appreciated in advance