Slow mySQL query caused by the WooCredits plugin

June 13, 2018 11:38 am


The WooCredits plugin caused downtime on our server today. I got the following message from our server provider WPEngine:

The downtime lasted a total of 8 minutes, and it appears to have been primarily caused by a slow mySQL query. In specific the query below:

SELECT www_posts.* FROM www_posts INNER JOIN www_postmeta ON ( www_posts.ID = www_postmeta.post_id ) WHERE 1=1 AND (
( www_postmeta.meta_key = ‘_credit_product’ AND www_postmeta.meta_value = ‘1’ )
) AND www_posts.post_type = ‘product’ AND ((www_posts.post_status = ‘publish’)) GROUP BY www_posts.ID ORDER BY www_posts.post_date ASC /* From /wp-admin/admin-ajax.php] in [/wp-content/plugins/woo-download-credits-platinum/woo-download-credits-platinum.php:623] */\G

We note also that a similar amount of downtime occurred yesterday, and the same query seems to be implicated.

Published by 5 Comments

5 Replies

Leave a Reply

Your email address will not be published.