• Resolved jimmysurprenant

    (@jimmysurprenant)


    I installed this plugin and let it run for some time. I realised the website was running slower than usual after some time and that the CPU was maxed out.

    Then I took a look into the Scheduled actions and see that there were more than 170 000 completed scheduled actions. Plugin version was 0.12.0

Viewing 5 replies - 16 through 20 (of 20 total)
  • I don’t know why ‘Woocommerce Admin Plugin’ didn’t add a way to easily purge these completed records. This is madness. Has anyone found a layman way to manage or delete these completed scheduled actions in bulk? with with a plugin or some other way?.

    @Those who ran the CLI command. How long did it take? I seem to have about 105k entries in the site I’m trying to fix from this awful feature. It’s taking forever and I’m not sure if it’s actually deleting anything, that’s the main issue. How do you know if it’s working or not? thanks!

    @brianlovelace I have a question about your setup.

    I realised belatedly that this problem was only occurring on sites where I had locked down the file permissions so that it wasn’t possible to add plugins or run core/theme/plugin updates from within with WordPress database. When I loosened those permissions, this problem resolved itself.

    Could this be what’s happening to you?

    • This reply was modified 5 years, 2 months ago by Millionleaves.

    @millionleaves I actually have pretty loose permissions on those types of folders since I run a WebP Plugin that needs a lot of access to generate the converted files. Bitnami made it pretty easy to run CLI commands, but it took too long so I had to come up with another solution…

    The solution that worked better for me was to run some SQL Commands to get rid of all of the excess lines, then ran a database optimization plugin to help clean up the databases when I was done. Here are the commands for those interested:

    Delete WooCommerce Admin Importer Scheduled Action Lines:

    DELETE FROM wp_posts
    WHERE post_type = ‘scheduled-action’
    AND post_title = ‘wc-admin_import_order’

    Delete WooCommerce Admin “Unsnooze Admin Notes” Lines:

    DELETE FROM wp_posts
    WHERE post_type = ‘scheduled-action’
    AND post_title = ‘wc_admin_unsnooze_admin_notes’

    Delete WooCommerce Admin “Action Scheduler” Comment Logs:

    DELETE FROM wp_comments
    WHERE comment_author = ‘ActionScheduler’
    AND comment_type = ‘action_log’

    Sorry, the code tag keeps making the SQL selectors highlighted in the code tag and I can’t get it to not do that… Here’s a PasteBin link that should be more helpful.

    Hopefully this helps some others that were in the same predicament as I was. It also works a LOT faster than the CLI command which was deleting a line every 5-10 seconds or so… these actions took around 4 minutes to delete over 105,000 useless lines.

    • This reply was modified 5 years, 2 months ago by brianlovelace. Reason: code tags were messed up
    • This reply was modified 5 years, 2 months ago by brianlovelace. Reason: code not displaying properly
    Jason Ryan

    (@viablethought)

    @brianlovelace

    Thanks for the pastebin link, this helped big time!

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘over 170 000 scheduled action created’ is closed to new replies.