Custom Search

You are hereBlog / bug fixed: Bad Behavior causes Drupal sluggishness

bug fixed: Bad Behavior causes Drupal sluggishness


Posted on October 10, 2008 by Denis

Printer-friendly versionSend to friend

ISSUE: Recently, I've noticed my Drupal site acting sluggishly, especially when I'm submitting/deleting content nodes or calling/querying data from the MySQL database. The sluggish performance was particularly noticeable when queries from the Views module are called upon. Tasks that would normally take milliseconds may take up to 20 seconds to 1 minute on my site.

This was EXTREMELY frustrating... until I found the solution!

So after many hours, if not many days of trial and error debugging...

THE SOLUTION: Uninstall the Bad Behavior module.

At this time I was using Bad Behavior version 6.x-1.0-rc2. If you can find a bug fix for this issue, post your solutions here.

And for the record, here's the context that led me to find the solution:

Initially, I thought this issue may have been due to limitations on my shared server hosting service Hostmonster. This theory came about when I was working on Dash Player, a next-generation Flash and XML-based media player that can be it's all-in-one YouTube service. The problem was basically that Dash Player's video playlists took forever to load. Since I've read online that a good number of people are usually not too happy with streaming video on shared server web hosts, I immediately thought my performance issue had to do with Hostmonster. But this was not the case!

Today I've somehow mustered the stamina to revisit the problem. It all began when I did a fresh Drupal 6.5 installation (which was released yesterday) to create yet another Drupal "sandbox" and realized that new site was running with blazing speeds.

I've created a simple method to the debugging -- editing a view with the Views module UI! All I did was click on any of the (+) symbols on view will calls up various parameter from the database. On my problematic Drupal installation, waiting for the parameters to load took up to 20+ seconds. It only took milliseconds for this to happen on my fresh installation.

Nevertheless, I took on a trial-and-error mission to find the culprit by painstakingly installing module by module (I have over 60 modules at this moment) until I found out Bad Behavior was really throwing a tantrum!

A few other modules that I've came across that may have been contributing to the sluggishness (though definitely not as much as Bad Behavior) were: Download Count and Advanced Help modules.

FINAL THOUGHTS 

Now that the problem is fixed, developing my Drupal sites would be so much more efficient (I no longer have to wait for those spinning icons to make me dizzy). On the other hand, Dash Player is now querying up playlists (which are generated by Views) lightning speed now just like how it does on dedicated servers! I would have never known Bad Behavior was the little bugger. The only guilt I may have now is maybe yelling a few times at the Hostmonster tech support guys and gals about the sluggishness before I found the fix. Forgive me please! Innocent

Anonymous's picture

At first I wasnt sure if this was actually for real or not, but it appears to be so. A bad behavior module? That’s fricken hilarious, in my opinion. When I thought I had seen it all, I see more! I guess if it help the problem, then that’s amazing stuff. Anything that can move the little annoying things along much faster has my email marketing vote.

recent comments

Anonymous's picture

Hi ,

I must say thanks for sharing your blogs and articles ,they all are very useful for me.

thanks metrogyl
http://supernsetips.com

Anonymous's picture

SHAAAZAAAMMMM!!!! This is a great and valuable post for all marketer's, love the way you brought your ideas about W. H. S. (2008). Keep it up. . My friend Jani has created a "little known" secret from siphoning traffic from facebook, none of the GURU's are teaching and it's working AWESOME! speak soon Julie 'FB Pro' Jameson

Anonymous's picture

Hello! akdceee interesting akdceee site!

Foxkeh

View Denis Lam's profile on LinkedIn