Quite a number of slow database queries caused by Defender

I have been given this warning….

Checking the case I can see that your account churchonline.solutions has reached monthly allowed usage of 600000 CPU seconds, due to which it was limited.

Checking your account statistics I can see quite a number of slow database queries:

And with a developer friend have nailed down the issue with Defender Pro and here’s one of the slow queries reports…:

1. Executed 10h 13m 44s ago for 14.234664 sec on Database –> Unknown (NOT FOUND / DELETED)

Date: 2017-04-26 22:06:00 Query_time: 14.234664 Rows_examined: 325599: Rows_sent 0 Lock_time: 0.000230

# Schema: church04_wp952 Last_errno: 0 Killed: 0 SELECT dlx_posts.ID FROM dlx_posts INNER JOIN dlx_postmeta ON ( dlx_posts.ID = dlx_postmeta.post_id ) WHERE 1=1 AND ( ( dlx_postmeta.meta_key = ‘ip’ AND dlx_postmeta.meta_value = ‘173.31.99.166’ ) ) AND dlx_posts.post_type = ‘wd_ip_lockout’ AND ((dlx_posts.post_status = ‘publish’:wink:) GROUP BY dlx_posts.ID ORDER BY dlx_posts.post_date DESC LIMIT 0, 1;

So this issue with Defender is spending my CPU seconds for the month. I have hundreds of these. Can you please let me know what your plug in is doing and how to fix it?

Thank You,

Adrian

  • Hoang Ngo
    • The Green Incsub

    Adrian,

    I hope you are well today.

    I think because we have too much records in the _posts table, so it become slowly. For now, please temporary turn off the IP Lockout module, so we can save some CPU times.

    I will replicate your issue on my VPS and fix it ASAP.

    Best regards,

    Hoang