• Resolved cnxsoft

    (@cnxsoft)


    I’ve recently installed WP Meta SEO plugin, and I did not see any issue, until today when I setup a post with 40+ photos.

    It’s basically impossible to edit such post because of very high CPU usage on the server due to mysqld, leading to failure to load photos.

    I have a dual core Xeon processor, and it shows mysqld using 100% on both core when this happens.

    So I went to mysql to check what may cause this:

    
    mysql> show full processlist;
    +-------+----------------+-----------+----------------+---------+------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Id    | User           | Host      | db             | Command | Time | State        | Info                                                                                                                                                                                                                                                                                                                                                                                                                 |
    +-------+----------------+-----------+----------------+---------+------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | 39497 | root           | localhost | NULL           | Query   |    0 | starting     | show full processlist                                                                                                                                                                                                                                                                                                                                                                                                |
    | 41673 | wordpress_db | localhost | wordpress_db | Sleep   | 3350 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | 48333 | wordpress_db | localhost | wordpress_db | Sleep   | 1020 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | 50298 | wordpress_db | localhost | wordpress_db | Sleep   |  240 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | 50760 | wordpress_db | localhost | wordpress_db | Query   |    0 | Sending data | SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1  AND (
      ( wp_postmeta.meta_key = '_wp_attachment_metadata' AND wp_postmeta.meta_value LIKE '%mini-pc-windows-comparison.jpg%' )
    ) AND wp_posts.post_type = 'attachment' AND ((wp_posts.post_status = 'inherit')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 8 |
    | 50771 | wordpress_db | localhost | wordpress_db | Sleep   |   62 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | 50846 | wordpress_db | localhost | wordpress_db | Sleep   |   38 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | 50918 | wordpress_db | localhost | wordpress_db | Sleep   |    8 |              | NULL                                                                                                                                                                                                                                                                                                                                                                                                                 |
    +-------+----------------+-----------+----------------+---------+------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    8 rows in set (0.00 sec)

    I get lot of request as shown above. So I checked wordpress source, and it shows it’s some code inside WP Meta SEO:

    /wp-content# grep "WHERE post_type IN" * -R
    plugins/wp-meta-seo/inc/class.metaseo-link-list-table.php:                      WHERE post_type IN $p_type
    root@venus:/srv/www/cnx-software.com/public_html/wp-content# 

    So I had to disable WP Meta SEO while editing this post.

    • This topic was modified 6 years, 10 months ago by cnxsoft.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author JoomUnited

    (@joomunited)

    Hi,

    Do the “WHERE post_type IN” string was in one of the 100% CPU queries?
    I don’t see it in the mysql result you have pasted.

    This query doesn’t seem to be one which need a lot of resources.

    Could you enable the mysql slow query log? Queries that take time (and of course cpu) should be reported in this log.
    It will help identify the cpu consuming queries.

    It could also be a conflict with another plugin, or something particular with your website.

    It will surely need a deeper look on it, would you create a free account on our website and drop us a ticket so we can take a closer look with you?
    https://www.joomunited.com/support/ticket-support

    Cheers

    • This reply was modified 6 years, 10 months ago by JoomUnited.
    Thread Starter cnxsoft

    (@cnxsoft)

    My mysql-slow.log file is empty.
    I think the query may not need many resources, but it’s repeated often even that it overloads the server. Each time I ran “show full processlist;” it would show another “WHERE post_type IN” query.

    Most photo could not upload, and for the ones that did, I may have to wait 5 five minutes until the photo is inserted in the post.

    I had to disable the plugin to be able to finish writing the article and publish it.
    That’s the link for your reference: https://www.cnx-software.com/2018/05/16/intel-nuc-kit-nuc7pjyh-review/

    I’d rather not register on another website.

    Plugin Author JoomUnited

    (@joomunited)

    Thanks for the informations.
    We’ll try on our test sites with the same content than you and will keep you informed.

    Cheers

    Plugin Author JoomUnited

    (@joomunited)

    Hi,

    We have tested with the same content as you and we don’t have same error.
    Could you give me the list of plugins you use to see if it could be a conflict with another plugin?

    Cheers

    Thread Starter cnxsoft

    (@cnxsoft)

    List of active plugins:

    adblock-notify-by-bweb
    adrotate-pro
    amp
    amp-analytics
    backwpup
    bad-behavior
    bwp-recent-comments
    carousel-slider
    comet-cache-pro
    contact-form-7
    cookie-law-info
    crayon-syntax-highlighter
    easy-wp-smtp
    ewww-image-optimizer
    exclude-pages
    flattr
    google-sitemap-generator
    maintenance-mode
    nofollow-links
    og
    page-sidebar-for-twentyseventeen
    really-simple-captcha
    shareaholic
    si-captcha-for-wordpress
    skimlinks
    social-media-widget
    tablepress
    tentbloggers-feedburner-rss-redirect-plugin
    tsl-iframe-unfilter
    tweetmeme
    user-registration-aide
    user-role-editor
    wordpress-easy-paypal-payment-or-donation-accept-plugin
    wordpress-social-login
    wp-anchor-header
    wp-crontrol
    wpdiscuz
    wp-nofollow-post
    wp-optimize
    wp-table-reloaded
    wptouch
    yet-another-related-posts-plugin

    Plugin Author JoomUnited

    (@joomunited)

    Thanks for the list.

    We don’t have know issues with one of this plugin.
    Unfortunately it’s too complicated to try all this plugin on our test sites furthermore with a configuration which could be different than yours.

    I’m afraid that if we can’t have access to your website or a test website with the same configuration, it would be impossible to check it.

    I understand if you don’t want to create a new account on a website, but if you change your mind, we’ll be able to check it and surely fix it.
    It may also help the community if other people is in your case.

    Cheers

    Thread Starter cnxsoft

    (@cnxsoft)

    I already spent around 4 hours yesterday trying to first identify, and then fix the issue, including by changing my MySQL configuration. So at this point, I’m not sure I want to spend more time on it, as it looks like a rather complex and potentially hard to reproduce issue.

    Plugin Author JoomUnited

    (@joomunited)

    I completely understand, let me know if you change your mind.

    Cheers,

    A quick note, I noticed that you have both yet-another-related-posts-plugin (YARPP) and Shareaholic installed. YARPP is known to take up a lot of server resources and is banned on most hosting platforms. Shareaholic offers Related Posts functionality as well and I suggest consolidating. Shareaholic does all the analysis, processing, and serving from our cloud, so there is no additional load on your server. Thought that this may help take off some pressure from your DB.

    Thread Starter cnxsoft

    (@cnxsoft)

    Thanks for the feedback. Since then I made some changes, installed Yoast SEO for Meta, and replacef Shareaholic with addthis, because the former used 33across and tynt which in the past caused issues with affiliate links (stole commissions).

    @cnxsoft

    This came as a surprise to us, as we carefully screen and choose our partners. Your note prompted an investigation on our end.

    33Across/Tynt has confirmed that they are not in the affiliate/commission business and no commission links fire from its code. We have no reason to doubt them. If you have evidence or can point us to articles that suggest something else, please do let us know. We would really appreciate it. We take this matter very seriously.

    That said, as an extra precautionary measure, you can also switch them off completely from your Shareaholic site settings. The control is 100% in your hands.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘High Mysqld CPU usage while editing post with many photos’ is closed to new replies.