• Resolved aprilia

    (@aprilia)


    I have been having server problems for the last week or so with a “server overloaded error”. I sent a help ticket to my hosting company and this was the result:

    (start)
    After a thorough investigation we were able to determine the cause of the load bursts from your account. It appears that the problem is with one of the tables in your motorcyc_wrdp1 database:

    24M /var/lib/mysql/motorcyc_wrdp1/wp_bad_behavior_log.MYD

    Queries issued to that database take too long to execute:

    4434543 | motorcyc_wrdp1 | localhost | motorcyc_wrdp1 | Query | 58 | Sending data | SELECT ip FROM wp_bad_behavior_log WHERE ip LIKE ‘68.84.200.242’ AND http_response = 403 |
    | 4434544 | motorcyc_wrdp1 | localhost | motorcyc_wrdp1 | Query | 58 | Sending data | SELECT ip FROM wp_bad_behavior_log WHERE ip LIKE ‘64.40.115.49’ AND http_response = 403 |
    | 4434545 | motorcyc_wrdp1 | localhost | motorcyc_wrdp1 | Query | 58 | Sending data | SELECT ip FROM wp_bad_behavior_log WHERE ip LIKE ‘74.130.17.241’ AND http_response = 403 |
    | 4434563 | motorcyc_wrdp1 | localhost | motorcyc_wrdp1 | Query | 39 | Sending data | SELECT ip FROM wp_bad_behavior_log WHERE ip LIKE ‘64.40.115.49’ AND http_response = 403 |
    | 4434572 | motorcyc_wrdp1 | localhost | motorcyc_wrdp1 | Query | 17 | Sending data | SELECT ip FROM wp_bad_behavior_log WHERE ip LIKE ‘64.40.115.49’ AND http_response = 403

    and are causing the MySQL server to consume a large portion of the CPU % to process the queries.

    Reducing the table’s size will most likely improve the performance of the SQL server and reduce the load generated by your account.

    Until then, I am afraid that the limitation will remain on, as we can not allow any further overloads caused by your account.
    (end)

    While I know some HTML & can manipulate php a little, I have not had to deal with the MySQL server side whatsoever. My questions:

    * Does this response make sense?
    * What do I do to make the table size smaller?

    I have been using both SK2 and BB and it was working well ever since WP2.0 came out. Did something change? I am using WP 2.0.4

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Are you running the most current version of BB?

    Thread Starter aprilia

    (@aprilia)

    Apparently not. I will go get 2.0.6 right now (as he holds his head in shame for not checking the obvious).

    Lol – well, i dunno if it’ll fix it all, but I recall the author’s had some blog posts about performance, so hopefully… 🙂

    Regardless of the BB version, I think you may have too many rows in the BB log table. You should delete as much as you don’t need.

    Thread Starter aprilia

    (@aprilia)

    I had the 1.2.4 and the log table was some 15Mb. I deleted it per the BB 2.0 instructions and gave word to my hosting service. All should be well now.

    I have changed this to resolved!

    Just a note, this is actually a failure on the part of the developers who created this. I have been working on optimizing the database servers at the hosting company I work at and keep running into this (I found your thread here while trying to track down whoever is responsible for the coding). You don’t really need to cut down on the data if the queries are properly indexed – just do this from the mysql commandline and it should fix it (run an explain [query] before and after and you’ll see the difference):

    alter table wp_bad_behavior_log add index ip_http_response (ip(10),http_response);

    That should fix it, I just fixed one that went from examining 200,000 rows 1 (that one included the date so the index had to be (ip(10),http_response,date).

    JohnRobison, in case you haven’t found the info yet, you can contact the BB dev at http://www.ioerror.us/software/bad-behavior/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bad Behavior Behaving Badly?’ is closed to new replies.