After upgrading to mysql 8. Rank Math is loading the site.

#649793
  • Resolved Denis
    Rank Math free

    Hi!

    After upgrading my database to Mysql 8 my server became 100% loaded and no way to reduce the load.

    Server support told me that your plugin creates a lot of queries to the database.

    Here is the data they sent me.

    ===============================
    | 3453 | website_co | localhost | website_com | Query | 159 | executing | SELECT COUNT( DISTINCT p.ID ) as count FROM wp_posts as p
    LEFT JOIN wp_postmeta AS pm ON ( p.ID = pm.post_id AND pm.meta_key = ‘rank_math_robots’ )
    WHERE (
    ( pm.meta_key = ‘rank_math_robots’ AND pm.meta_value NOT LIKE ‘%noindex%’ ) OR
    pm.post_id IS NULL
    )
    AND p.post_type = ( ‘product’ ) AND p.post_status = ‘publish’
    ===============================

    ===============================
    mysql> explain SELECT COUNT( DISTINCT p.ID ) as count FROM wp_posts as p LEFT JOIN wp_postmeta AS pm ON ( p.ID = pm.post_id AND pm.meta_key = ‘rank_math_robots’ ) WHERE (( pm.meta_key = ‘rank_math_robots’ AND pm.meta_value NOT LIKE ‘%noindex%’ ) OR pm.post_id IS NULL) AND p.post_type = ( ‘product’ ) AND p.post_status = ‘publish’;
    +—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
    | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
    +—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
    | 1 | SIMPLE | p | NULL | ref | type_status_date | type_status_date | 164 | const,const | 110352 | 100.00 | Using index |
    | 1 | SIMPLE | pm | NULL | ref | post_id,meta_key | post_id | 8 | website_com.p.ID | 42 | 0.12 | Using where |
    +—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
    2 rows in set, 1 warning (0.01 sec)
    =====================================

    Help me solve the problem please.

    My server is down right now because of this error.

    Regards Denis.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Denis
    Rank Math free

    I have now disabled your plugin and the load has gone down. Only disabling it helped me.

    What do I need to do to make your plugin work normally?

    Best Regards Denis

    Hello,

    Thank you for your query, and we are so sorry about the trouble this must have caused.

    The issue seems to be coming from the sitemap module of our plugin. Please disable it from WP Dashboard > Rank Math SEO > Dashboard, and you should be able to use the plugin without any issues.

    Our devs are looking into this, and we will get back to you as soon as we have an update.

    We really appreciate your patience in the meantime.

    Hello,

    Our developers have fixed the issue internally. Please share the WordPress & FTP access of your site so they can apply the patch and fix the issue.

    Please do take a complete backup of your website before sharing the information with us.

    Looking forward to helping you.

    Denis
    Rank Math free

    Good afternoon.

    Thank you for your quick response.

    Could you tell me what needs to be added or changed?

    Our programmer will do everything.

    Regards Denis.

    Hello Denis,

    To apply the patch, please update the contents of the file wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/providers/class-post-type.php
    with the contents on this gist https://gist.github.com/Nickbahson/c9ba8d425fbfee182d6552567ef01779

    Please do let us know how this turns out.

    Thank you

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘After upgrading to mysql 8. Rank Math is loading the site.’ is closed to new replies.