High Mysqld CPU usage while editing post with many photos
-
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.
Viewing 11 replies - 1 through 11 (of 11 total)
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.