Server Crashed because of Plugin

Home Forums Product Support Forums Related Posts Pro for WordPress Support Server Crashed because of Plugin

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 9 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3837
    george921
    george921
    Participant

    When activated the plugin it ran a process that eventually crashed the site. Our hosting company (we have a dedicated server) traced it back to your server.

    See below:
    | 5009 | devhoopl_dev | localhost | devhoopl_dev | Query | 349 | Copying to group table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘positive thinking today’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘positive thinking golf not played something important holes swing doubt’ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 8054) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘positive thinking today’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘positive thinking golf not played something important holes swing doubt’ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |
    | 5270 | devhoopl_dev | localhost | devhoopl_dev | Query | 227 | Copying to tmp table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 43277) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |
    | 5423 | devhoopl_dev | localhost | devhoopl_dev | Query | 164 | Copying to tmp table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 43277) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |
    | 5563 | devhoopl_dev | localhost | devhoopl_dev | Query | 101 | Copying to tmp table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 43277) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘laundromat elderly pays’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |
    | 5707 | devhoopl_dev | localhost | devhoopl_dev | Query | 17 | Copying to tmp table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘kitchen puppet’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘puppets puppet’ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 3048) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘kitchen puppet’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘puppets puppet’ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |

    #3840
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I see no errors in the queries, they look okay. There is no reason it should have crashed the server.

    Do you have any php and apache error log or anything else available? They might contain more information, these are only sql queries.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #3844
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Wait a second, I see something strange, altough I don’t know if it’s related to a crash. Some of the lines contain:

    OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘caption galifianakis com source imgur id=”” align=”alignnone” width=”635″‘ IN BOOLEAN MODE))

    That looks very strange to me, the commas are not stripped as the should be.

    Would you please open up the wp-content/plugins/related-posts-pro/includes/related_content.class.php file and scroll down to line 1090, where you should see this:

    $str = str_replace(array(".", ",", "$", "\\", "/", "{", "^", "}","?", "!", ";", "(", ")", ":", "[", "]"), " ", $str);
    

    try to modify that line to this:

    $str = str_replace(array(".", ",", "$", "\\", "/", "{", "^", "}","?", "!", ";", "(", ")", ":", "[", "]", '"', "'"), " ", $str);

    I’m not sure if it’s related to the crash, but if so, then this should solve the problem.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #3850
    george921
    george921
    Participant

    I can ask is it possible that another plugin caused it?

    Let me try this and have the hosting company look

    G

    #3851
    george921
    george921
    Participant

    Yeah no dice and it’s 100% the plugin. We turned it on and off and everytime if ate up the CPU. See attached;
    Nevermind, there it goes, CPU usage just shot up 100% on MySQL.

    | 50317 | devhoopl_dev | localhost | devhoopl_dev | Query | 40 | Copying to tmp table | SELECT
    hooplaha_posts.post_title as title,
    hooplaha_posts.ID as id,
    hooplaha_posts.post_date as date,
    hooplaha_posts.post_content as content,
    hooplaha_posts.post_excerpt as excerpt,
    hooplaha_users.user_nicename as author,
    hooplaha_posts.post_type as post_type,
    GROUP_CONCAT(DISTINCT hooplaha_terms.term_id) as terms,
    (
    MATCH(hooplaha_posts.post_title) AGAINST (‘goose roast it&#039’ IN BOOLEAN MODE) +
    MATCH(hooplaha_posts.post_content) AGAINST (‘goose not holiday potatoes kitchen into meal christmas around cooked’ IN BOOLEAN MODE)) as relevance
    FROM hooplaha_posts
    LEFT JOIN hooplaha_postmeta ON hooplaha_postmeta.post_id = hooplaha_posts.ID
    LEFT JOIN hooplaha_users ON hooplaha_users.ID = hooplaha_posts.post_author
    LEFT JOIN hooplaha_term_relationships ON hooplaha_posts.ID = hooplaha_term_relationships.object_id
    LEFT JOIN hooplaha_term_taxonomy ON hooplaha_term_taxonomy.term_taxonomy_id = hooplaha_term_relationships.term_taxonomy_id
    LEFT JOIN hooplaha_terms ON hooplaha_term_taxonomy.term_id = hooplaha_terms.term_id
    WHERE

    (hooplaha_posts.ID <> 8167) AND
    (hooplaha_posts.post_type REGEXP ‘dummy_notting|post|page’) AND
    hooplaha_posts.ID NOT IN (-99) AND
    (hooplaha_posts.post_status = ‘publish’) AND
    (MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘goose roast it&#039’ IN BOOLEAN MODE) OR MATCH(hooplaha_posts.post_title,hooplaha_posts.post_content) AGAINST (‘goose not holiday potatoes kitchen into meal christmas around cooked’ IN BOOLEAN MODE))
    GROUP BY hooplaha_posts.ID
    ORDER BY relevance DESC, hooplaha_posts.post_date DESC
    LIMIT 10 | 0.000 |

    #3852
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    What size is the db (post count)?

    If there are like 10k post, then some tweaking might be needed. The 100% peak usage is not an issue, it can go up to 100% in search queries for a very short time. The issue is if it stays up on 100% for a long time, then the server might or might not crash.
    Do you have a swap file enabled? MySQL likes to use a lot of memory, and by lot I mean a hell of a LOT. When I moved this site I forgot to turn on the swap file, and after just installing a plain new empty WordPress it crashed after the 3rd refresh, and this server uses 1G memory.

    If the swap file is okay, then there are lots of other options to tweak:

    If you have a bigger database, like 10k posts you should consider turning off the content relevance as there is a very high chance that title relevance will match other titles. You can do that on the “Relevance Options” panel by turning off the “Look in content?” option.

    Plus another and possibly the most effective tweak is to reduce the keyword count, it exponentially affects the speed of the query. So again on the “Relevance Options” try to reduce the “Keywords maximum count” from 10 to 3. Depending on the database size this should improve the performance extremely.

    Or maybe your server doesn’t like the boolean mode search. What if you turn off the fulltext search. On the “Advanced Options” panel:

    • Turn OFF the “Use fulltext lookup if available?”
    • Turn ON the “Enable cache?”

    Altough fulltext search should be more effective in terms of performance, in some cases I found it’s exactly the other way around. There is no other way to know, but testing.

    You can try experimenting with these options, these control the most of the resources.

    Let me know which of these helped, I’m all in for feedback. I must close the office now, it’s getting too late here. Will get back to you tomorrow morning. Hopefully these suggestions will help.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.