Custom Search

bug fixed: Bad Behavior causes Drupal sluggishness


Posted on October 10, 2008 by Denis

Send to friendPrinter-friendly version

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • Allowed HTML tags: <a> <b> <blockquote> <cite> <center> <code> <dd> <dl> <dt> <em> <i> <img> <ol> <p> <ul> <li> <strong>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
4 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Creative Commons license icon Creative Commons license icon
This work is licensed under a Attribution Share Alike Creative Commons license