My hosting said my Drupal website is uses to many resources? Help!

mrjw - February 28, 2007 - 23:43

Hello, about 3 days ago my webhost 1and1.com put a .htaccess file in my webserver root to redirect all connection attempts back to http://localhost/ which stopped 100% of traffic to all my websites.

I also received an email from 1and1 sating that my Drupal/index.php file was the problem and that I needed to decrease the server load ofthe index.php.

How would I do this? Any suggestions?

do you have a lot of modules

gollyg - March 1, 2007 - 02:21

do you have a lot of modules enabled, or have you modified any code yourself. perhaps a coding error is making it run inefficiently? Is it running on your local machine with the preset 8M resource limit in php?

otherwise, go check out other hosting?

Using many blocks can use

VeryMisunderstood - March 1, 2007 - 02:43

Using many blocks can use extra resources also. consider the blockcache.module

Recap

mrjw - March 1, 2007 - 06:07

I current have 50 modules enabled. I have done very light editing just recently (4-5days ago) with changing the story's apperance by theming the template.php file.

I had blockcache installed.

I really need to trim down the CPU resource deal with my site because my next option would cost me roughly 8x to 10x more money for hosting a site that only gets 700 unique hits a day.

I have my site in offline mode now (1and1.com turned my site back on and agree'd to allow me to reduce my site's CPU/Memory usage) and I'll try and disable some of the modules. But if theres any other suggestions anyone could give me please let me know, thanks!

One more thing. When I click a link on my site the status bar at the bottom of the browser jumps back from "Waiting for mysite.com" & "Reading from mysite.com" about 7-20 times befor actually going to the page I clicked on, what would cause this?

The problem is, its a little

VeryMisunderstood - March 1, 2007 - 07:23

The problem is, its a little hard to help with, when you or your host, aren't explaining what resources need to be cut back ? RAM ? SQL connections ? querries ? what exactly are they asking you to trim down ? your site shouldn't be using any more RAM then your php.ini allows. are you running a custom php.ini ? are you over riding their defaults using some other method ? like .htaccess ?

personally, I'd install the devel.module to try and narrow down, what exactly is going on with your site. what querries are taking the longest ?

have you looked at the handbook pages about how to optimize your server ? specifically MySQL ? have you taken any of those steps ? has your host ?

what are your block cache settings ? What modules are in use ? What are those modules, how many blocks are on your pages ? How many articles on your front page ?

Is your Drupal installation and all modules up to date ? were there any modules you are using that had issues in the issue querry that could be causeing a situation on your site ?

What errors were showing up in your apache error logs on your server before you host shut down your site?
Were there any errors in your Drupal watchdog table ?

Many of these questions could have been avoided if we had a link to your site so that we can see for ourselves.

One more thing. When I click a link on my site the status bar at the bottom of the browser jumps back from "Waiting for mysite.com" & "Reading from mysite.com" about 7-20 times befor actually going to the page I clicked on, what would cause this?

with 50 modules enabled, it would be hard to guess at what could be causing this. care to list the modules you have enabled ?

7-20 times is a huge gap, have a link so that we can see this behavior ?

I don't know much about 1and1.com I've seen a few other threads on this board about them but didn't read them over too well. Maybe a search using 1and1 as a key term will turn up more information for your specific host. If they are an overly restricting host, you may want to seek out a new one who can be considered "Drupal Friendly".

the back and forth would

gollyg - March 1, 2007 - 08:26

the back and forth would tend to be indicating hits on the server. This may be due to any number of things, but the likely candidates are:
many images on the page;
or many style sheets/js files being downloaded. This could be caused by the number of modules you have enabled - if each one is using its own style sheet this could account for all of the requests.

but yeah, a link to the site would help. (of course its off line so....)

Follow up

mrjw - March 1, 2007 - 09:31

I have not read the handbook about optimizing mysql, I will read that after this post.

I updated my Drupal version from 4.7 to 5.1 about 2 hours ago. Heres the break down between my 4.7 module list & my 5.1 module list.

Drupal 4.7 module list (Activated modules - non standard 43 total)

Adminblock
Adsense
Adsense_injector
Article
Bookmark_us
cck
comment_info
Comment_notify
Contemplate
Contextlinks
DBA
Devel
Disknode
Feedback
Filemanager
Front(Frontpage)
Gmap
Googlesearch
Gsitemap
Image
Imce
Jstools
Location
Logotool
Nice_menus
Nodewords
Panels
Pathauto
Phpbb
Print
Privatemsg
Relatedlinks
Resultcache
Sitemenu
Statistics_filter
Tagadelic
Taxonomy_block
Taxonomy_breadcrumb
Taxonomy_menu
Tinemce
Title
Video
Views

-Standard 4.7 enabled modules 20 total
Archive
Block
Comment
Contact
Drupal
Help
Menu
Node
Page
Path
Ping
Poll
Profile
Search
Statistics
Story
System
Taxonomy
Tracker
Upload

**********

Drupal 5.1 module list (Activated modules - non standard 7 total)

Blockcache
Google Sitemaps
IMCE
Pathauto
Sitemenu
Taxonomy Menu
TinyMCS

-Standard 5.1 enabled modules 7 total
Comment
Menu
Path
Ping
Taxonomy
Throttle
Upload

On 4.7 I had Blockcache set to default and no Cache settingfor the site.

On the 5.1 installation I turned Blockcache on and under "Performance"
Caching mode: Enabled
Minimum cache lifetime: 1 Hour
Bandwidth optimizations: Both options are greyed out.

I did recently have an issue with Watchdog which caused my database size to launch up from 3MB to an insane 67MB, I removed all Watchdog entries (5 days ago) and the database returned to 3MB. If you would like to check out the site to investigate feel free, the URL is www.evilpsp.com

Thank you for taking the time to help out if theres any other information I'd need to give to help resolve this issue please let me know :)

before you cleared the

VeryMisunderstood - March 1, 2007 - 16:59

before you cleared the watchdog table did you inspect the watchdog entires ?
are you running cron.php regularly, either manually or with a cron job, to insure that things like the watch dog table are cleared are specific intervals ? Doesn't seem like this is the case, if your watchdog table alone was 64MB.

Again, if your host isn't being specific enough about what resources are a problem for them, its difficult to help further. It becomes a wait and see, if it hapens again situation.

other questions in previous post that you havnen't answerered which are important is the apache error logs, what exactly was going on at the time your site was shut down ?

Taking a brief look at your site, I wouldn't think you need 57 pages of front page news. some of those pages should be removed from being promoted to front page, which should reduce your querries on the front page.

 
 

Drupal is a registered trademark of Dries Buytaert.