Hi there @ravanh,
we have a very large actionscheduler_actions database table with over 34k entries assigned to the mailpoet/cron/daemon-trigger
and mailpoet/cron/daemon-run
hooks.
They seem to date back over the last 6 months or so. Are these entries not supposed to be flushed after 30 days? What could be going wrong here?
Indeed, with default functionality Action Scheduler would generally clear out any completed or cancelled actions from more than a month ago: https://actionscheduler.org/#housekeeping
Are those older actions from ~6 months ago all completed or cancelled? If they are in a different status (i.e. past-due and just not running), then that would be a different situation.
On the other hand if they are all completed/cancelled, and they are not being cleaned out, it’s possible something is overriding the default functionality, or else something is breaking the action scheduler from working as expected. I’d recommend:
- Checking the server’s error logs to see if there is anything logged that might explain why the cleaning is failing
- Removing the old completed/cancelled logs via WP-CLI: https://actionscheduler.org/wp-cli/
the mailpoet_scheduled_tasks and mailpoet_scheduled_task_subscribers tables are pretty large too, with entries dating from as early as the start of 2021… Same issue?
This would be a separate situation. The past Action Scheduler actions are automatically cleaned out, however the tasks in MailPoet are not handled the same way. However, you can manually clean them out if your database size is growing too large — we have information about this here:
https://kb.mailpoet.com/article/402-reducing-database-size-for-mailpoet-tables