• Resolved mwestrik

    (@mwestrik)


    Hi, since I start using your plugin, the rror_log in public_html AND the one in wp-admin are filling up with

    [25-Jul-2025 09:57:43 UTC] PHP Warning: unserialize(): Error at offset 214 of 284 bytes in /home/backgroun/public_html/wp-content/plugins/site-reviews/vendors/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 397 [25-Jul-2025 09:57:43 UTC] PHP Warning: unserialize(): Error at offset 215 of 286 bytes in /home/backgroun/public_html/wp-content/plugins/site-reviews/vendors/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 397 [25-Jul-2025 09:57:43 UTC] PHP Warning: unserialize(): Error at offset 76 of 139 bytes in /home/backgroun/public_html/wp-content/plugins/site-reviews/vendors/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 397

    it was already about 15GB (!!!) in one week. We do not even use woocommerce. How to prevent this from happening over and over again?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Paul

    (@pryley)

    Action Scheduler is a library built by WooCommerce (i.e. WordPress, since they own WooCommerce) for the WooCommerce plugin to manage job queues more efficiently (i.e. sending customer emails, processing payments, etc.).

    The Action Scheduler library is built in such a way to allow other plugins to include and use it. Notable plugins that also use the Action Scheduler library are RankMath, WPForms, WP Mail SMTP, The Events Calendar, WP Rocket, All in One SEO, Jetpack, Yoast SEO, MonsterInsights, Site Reviews, and many more.

    Is there any chance that you attempted to manually modify any of the action scheduler entries in the database (i.e. in the wp_actionscheduler_actions table)? If so, that may be causing the problem (based on this issue in Github).

    Regardless, here is how to fix it:

    If you have access to WP-CLI and are familiar with how to to use it on your server, then this command should remove all actions (including any invalid entries) from the database:

    wp action-scheduler clean

    Otherwise, try following the directions in this post: https://www.mrkwp.com/2023/09/how-to-clear-scheduled-action-logs-in-wordpress/

    Thread Starter mwestrik

    (@mwestrik)

    Hi, thanks for your answer. the problem is not so much how to delete them, I know how to do that. The problem is how to prevent it from happening. Because I don’t think it is normal that a plugin like Site Reviews should cause the event logs to fill up with GB’s of lines within a few days.

    Also, that does not solve the huge, extremely huge error_log files in both wp root and wp_admin directories. That does indicate something goes wrong with the Sites Reviews plugin.

    I deleted the logs last friday and emptied the scheduled logs table. Today, the sizes are:

    /error_log: 5,47GB – just messages from site reviews
    /wp_admin/error_log: 7,02GB – the same, just from this plugin

    Database table scheduler_logs: 14.871.522 rows, 1,9GB

    Plugin Contributor Paul

    (@pryley)

    Because I don’t think it is normal that a plugin like Site Reviews should cause the event logs to fill up with GB’s of lines within a few days.

    You are correct, this is not normal so something else is going on.

    I suppose it’s possible that there is a problem with the custom Site Reviews database tables. Site Reviews will schedule a plugin migration whenever it’s needed using Action Scheduler, so perhaps it is related to that?

    You can check if this is the case like this:

    Since you said you are familiar with deleting rows in the database, I am assuming you are also able to view the table rows. If so, view the wp_actionscheduler_actions table in your database and look under the “hook” column. Do all of the entries start with site-reviews/, or are they something else? And if so, what does the status say, complete, pending, or failed?

    If most of the hook entries do not start with site-reviews/, then it’s likely that the problem is not directly coming from Site Reviews.

    Here’s why:

    The way Action Scheduler works is that the latest version of the library is always the one that is loaded. So if you have three different plugins that include Action Scheduler and each plugin has a different version of the library, only the one that has the latest version of the Action Scheduler library is the one that will be loaded and used by all three plugins.

    Have you manually modified or deleted any tables in your database?

    The error you provided shows this:

    [25-Jul-2025 09:57:43 UTC] PHP Warning: unserialize(): Error at offset 214 of 284 bytes in /home/backgroun/public_html/wp-content/plugins/site-reviews/vendors/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 397 

    This means that Action Scheduler is throwing an error when getting a queued action from the database and attempting to unserialize the data in the schedule column of the wp_scheduledactions_actions table in your database.

    So to troubleshoot why this is happening, view the wp_scheduledactions_actions table in your database and look at the values in the schedule column. They should all have serialized values that look something like this:

    Or more specifically, like this:

    O:32:"ActionScheduler_IntervalSchedule":5:{s:22:"*scheduled_timestamp";i:1754012982;s:18:"*first_timestamp";i:1753926517;s:13:"*recurrence";i:86400;s:49:"ActionScheduler_IntervalSchedulestart_timestamp";i:1754012982;s:53:"ActionScheduler_IntervalScheduleinterval_in_seconds";i:86400;}

    If there are any rows where the schedule value is empty or not a serialized string, then that entry is causing Action Scheduler to throw the PHP error that is filling up your log files.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘errorlog filling up with unserialize(): Error at offset’ is closed to new replies.