Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.78k stars 894 forks source link

mysqld 99% CPU usage on Yoast 5.0.1 #7466

Closed ThePhoenixBird closed 7 years ago

ThePhoenixBird commented 7 years ago

Please give us a description of what happened.

After Updating 5.0.1 Editing and Posting pages/posts causes mysqld go insane on CPU usage 99% over 2 or 3 minutes.

Deactivated all plugins, then went one by one, until I finally found that YOAST was causing my mysqld go 99% of CPU usage over 2 to 4 minutes EVERY TIME that i hit Publish/Update a post.

Some crazy query must be causing a huge load on the mysql server.

Reference with other people reporting same issue: https://wordpress.org/support/topic/after-updating-5-0-1-editing-and-posting-pages-load-slow/

Please describe what you expected to happen and why.

Edit/Publish a new post, hit save, page refresh quickly as the rest of the Dashboard.

Disabling Yoast restores the speed on the website.

How can we reproduce this behavior?

  1. Large wordpress site with 3k+ posts
  2. Edit/Publish a new post, takes about 2/4 minutes to post
  3. While page is loading, check top on the linux console and see mysqld go to 99% CPU usage
  4. Cry as your server struggles to publish a simple edit.

Technical info

thulshof commented 7 years ago

Thanks for reporting this issue.

We'll need to know if this behavior is caused by a conflict with a plugin or theme. Therefore we want to ask you to do the following;

If it still occurs:

If it doesn't occur anymore:

If the problem reoccurred after reactivating one of your plugins, please add that information to your bug report.

Also, could you please check for errors in your server log?

Thanks!

atimmer commented 7 years ago

@ThePhoenixBird Maybe a strange question, but how many posts do you have on your site?

ThePhoenixBird commented 7 years ago

@thulshof I will run more tests once I reach home. @atimmer My wordpress has about 3k posts and 5k comments.

Some extra info Server runs on Ubuntu 16.04 LTS, NGINX, PHP7-FPM, MariaDB, Redis

But basically this happens: http://imgur.com/a/xY9wq

laserjobs commented 7 years ago

Same problem here: mySql 5.5 php 7 Apache Nginx PHP FPM Varnish 7k posts 30k comments

laserjobs commented 7 years ago

From the Slow log script_filename = /home/directory/public_html/wp-admin/post.php [0x00007fe6bde142a0] mysqli_query() /home/directory/public_html/wp-includes/wp-db.php:1877 [0x00007fe6bde14200] _do_query() /home/directory/public_html/wp-includes/wp-db.php:1765 [0x00007fe6bde14110] query() /home/directory/public_html/wp-includes/wp-db.php:2113 [0x00007fe6bde13fe0] delete() /home/directory/public_html/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php:65 [0x00007fe6bde13f30] delete() /home/directory/public_html/wp-content/plugins/wordpress-seo/admin/links/class-link-storage.php:111 [0x00007fe6bde13e90] cleanup() /home/directory/public_html/wp-content/plugins/wordpress-seo/admin/links/class-link-content-processor.php:65 [0x00007fe6bde13e00] store_links() /home/directory/public_html/wp-content/plugins/wordpress-seo/admin/links/class-link-content-processor.php:54 [0x00007fe6bde13ce0] process() /home/directory/public_html/wp-content/plugins/wordpress-seo/admin/links/class-link-watcher.php:48 [0x00007fe6bde13c10] save_post() /home/directory/public_html/wp-includes/class-wp-hook.php:300 [0x00007fe6bde13b20] apply_filters() /home/directory/public_html/wp-includes/class-wp-hook.php:323 [0x00007fe6bde13aa0] do_action() /home/directory/public_html/wp-includes/plugin.php:453 [0x00007fe6bde13960] do_action() /home/directory/public_html/wp-includes/post.php:3510 [0x00007fe6bde13550] wp_insert_post() /home/directory/public_html/wp-includes/post.php:3583 [0x00007fe6bde13470] wp_update_post() /home/directory/public_html/wp-admin/includes/post.php:378 [0x00007fe6bde13220] edit_post() /home/directory/public_html/wp-admin/post.php:193

ThePhoenixBird commented 7 years ago

Ran a few more tests, issue persists

Enabled plugins: Yoast 5.0.1 Akismet Anti-Spam 3.3.3 Jetpack by WordPress.com 5.1 Nginx Helper 1.9.10

mmikhan commented 7 years ago

Please inform the customer of conversation # 209653 when this conversation has been closed.

mmikhan commented 7 years ago

According to the topic here.

After 5.0.2, all plugins which do change post dates in bulk doesn’t work and throw 504 Gateway errors. In several installations, I was able to test and see that if the rest of the plugins are disabled and yours is enabled, it will make the Gateway error. Also, few different plugins were tested like https://bg.wordpress.org/plugins/post-date-time-change/. It happens after 5.0.2, so I am reverting to the earlier version. Hopefully, you can find what is happening there.

atimmer commented 7 years ago

We have changed the internal linking to address performance issues which should fix this issue as well. This is in Yoast SEO 5.1.

harisamjed commented 6 years ago

Hi there, We are on 7.0.2 premium version and it seems this issue is still not fully resolved. When trying to update multiple posts at same time, site goes down due to Big Load on server but if we deactivate Yoast Plugin then it work without issue. How can we solve it?