wp_actionscheduler_actions 1.7 GB in size thousands of entries please help

#430303
  • Resolved Mathew
    Rank Math pro

    my database has grown to 1.7gb it has thousands of entries of rank_math/analytics/get_inspections_data, can you tell me how to delete these please to shrink the size of the table thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • rank_math/analytics/get_console_data

    rank_math/analytics/get_analytics_data

    rank_math/analytics/data_fetch

    these are just some of the entries

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    It seems like you have a lot of data on your website because the actions for the inspection data generate once per URL of your website.

    If this is taking out a lot of space we recommend disabling the IndexStatus feature by going to WordPress Dashboard > Rank Math > General Settings > Analytics.

    ​​​​​​​After that you can look for the actions that contain the word inspections_data and delete all of them from the database.

    This should help clear a lot of space on the database.

    Don’t hesitate to get in touch if you have any other questions.

    hey thanks could you supply me with a query to delete all of this automatically please as there are thousands of entries thanks

    Hello,

    Please make sure that you disable the IndexStatus first and then execute the following query, changing the database name to match the one on your server:

    
    DELETE FROM rm_actionscheduler_actions WHERE <code>hook</code>='rank_math/analytics/get_inspections_data'
    

    Don’t hesitate to get in touch if you have any other questions.

    hi i tried that but i got the following error message –

    DELETE FROM wp_actionscheduler_actions WHERE hook=’rank_math/analytics/get_inspections_data’

    MySQL said: Documentation
    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘hook=’rank_math/analytics/get_inspections_data” at line 1

    i dont rely know what im doing is there anyway you can look at it for me ? please

    Hello,

    Sure, please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section. Also, please install a database plugin on your site like WP PhpMyadmin so we can access your database.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    i have also now installed the plugin thanks

    Hello,

    I went ahead and run the correct SQL query and it remove a fraction of the sheer amount of rows you have in that table.

    Before we do further cleaning, kindly take a full backup of your database first.

    Let us know after doing so and we will do the next step.

    Looking forward to helping you on this one.

    hi jeremy i have taken the back up thanks for your time

    Hello,

    Thanks again for your patience.

    I went ahead and cleared any Rank Math related completed actions and cleared the logs. The 7 million rows have been removed.

    If you prefer to adjust the purge time so your action scheduler log will not always fill up, you can make use of this filter code:

    add_filter( 'action_scheduler_retention_period', 'wpb_action_scheduler_purge' );
    /**
     * Change Action Scheduler default purge to 1 week
     */
    function wpb_action_scheduler_purge() {
     return WEEK_IN_SECONDS;
    }

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi Jeremy i appreciate that, i just checked the size in GB of the table and it is still 1.7GB in size? It also shows that there are thousands of pages but most of them are blank when i show the whole table there are only a fractoin of rows compared to what they used to be, i was wondering if you would be able to go back in and tell me whats taking up the 1.7GB as i dont have a clue hats going on

    thanks for your help i really appreciate it

    Hello,

    We purged all the complete actions from the database as those are not necessary anymore and that reduced the size of the database on the website to roughly 25MB instead of the huge over 1GB size you had before.

    Don’t hesitate to get in touch if you have any other questions.

    Thanks for that appreciate it.

    why does it still say it’s 1.7GB in size on siteground?

    Am I correct in saying you reduced the size of wp_actionscheduler_actions ?

    Hello,

    Yes, we reduced the size of that table but every time a scheduled action runs on the website that will continue to populate the table with data.

    You can use the filter mentioned above to purge the data more frequently so it doesn’t grow exponentially.

    Don’t hesitate to get in touch if you have any other questions.

Viewing 15 replies - 1 through 15 (of 17 total)

The ticket ‘wp_actionscheduler_actions 1.7 GB in size thousands of entries please help’ is closed to new replies.