• Resolved Paul Foxton

    (@paul-foxton)


    Hi,

    The wp_actionscheduler_logs table in my MySQL db is filling up to over 2Gb in seconds. If I use PhpMyadmin to empty the table (TUNCATE), the db reduces in size, but then immediately fills again.

    My host (Siteground) had a 1Gb limit on my db size so will place limits on my db if I can’t resolve this.

    Woocommerce logs are showing a critical error as follows:

    2025-05-01T10:23:29+00:00 Critical Uncaught RuntimeException: Unable to release actions from claim id 1731106. in /home/customer/www/learning-to-see.co.uk/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1128  
    Additional context
    {
    "error": {
    "type": 1,
    "file": "/home/customer/www/learning-to-see.co.uk/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php",
    "line": 1128
    },
    "remote-logging": true,
    "backtrace": [
    "",
    "#0 /home/customer/www/learning-to-see.co.uk/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(440): ActionScheduler_DBStore->release_claim(Object(ActionScheduler_ActionClaim))",
    "#1 /home/customer/www/learning-to-see.co.uk/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(195): ActionScheduler_HybridStore->release_claim(Object(ActionScheduler_ActionClaim))",
    "#2 /home/customer/www/learning-to-see.co.uk/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(158): ActionScheduler_QueueRunner->do_batch(25, 'WP Cron')",
    "#3 /home/customer/www/learning-to-see.co.uk/public_html/wp-includes/class-wp-hook.php(324): ActionScheduler_QueueRunner->run('WP Cron')",
    "#4 /home/customer/www/learning-to-see.co.uk/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)",
    "#5 /home/customer/www/learning-to-see.co.uk/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)",
    "#6 /home/customer/www/learning-to-see.co.uk/public_html/wp-cron.php(191): do_action_ref_array('action_schedule...', Array)",
    "#7 {main}",
    "thrown"
    ]
    }

    I can’t access the scheduled actions page at /tools.php?page=action-scheduler&status=past-due&order=asc, the page gives me a critical error.

    The most recent plugin-woocommerce log shows a large number of rows as folow:

    2025-04-30T00:01:00+00:00 Warning Empty patterns received from the PTK Pattern Store

    I’m assuming this is related to the fetch_patterns entry in the wp_actionscheduler_actions table in the db, this is the data from the relevant row in that table:

    0
    fetch_patterns
    pending
    2025-04-30 16:41:40
    2025-04-30 16:41:40
    []
    O:30:"ActionScheduler_SimpleSchedule":2:{s:22:"*...
    7
    0
    2025-05-01 11:06:48
    2025-05-01 11:06:48
    0
    NULL
    10

    Previously, it was this table, wp_actionscheduler_actions, that was causing a db size issue. Yesterday I deleted all actions that weren’t pending, exported the table and then imported it to reclaim disk space. That seemed to solve the db size issue.

    But ovenight, the wp_actionscheduler_logs table has filled up (it was previously about 200MB, now over 2GB). Before this it was around 200MB.

    I’ve tried disabling all plugins, but still can’t access the Scheduled Actions page in Woocommerce – it still gives me a critical error.

    If anyone can help me with this problem I’d be most grateful! It’s the log file filling up that’s the problem.

    The rows in the wp_actionscheduler_logs table all seem to be the same, with this message: “action ignored via Async Request”. A new row is added multiple times per second – I’m not sure how many, but it fills the first page at 50 rows viewed.

    System Status:

    <details><summary>System Status Report</summary>

    <br>### WordPress Environment ###<br><br>WordPress address (URL): [Redacted]<br>Site address (URL): [Redacted]<br>WC Version: 9.8.3<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ✔ 3.9.2<br>Log Directory Writable: ✔<br>WP Version: 6.8.1<br>WP Multisite: –<br>WP Memory Limit: 768 MB<br>WP Debug Mode: –<br>WP Cron: ✔<br>Language: en_US<br>External object cache: –<br><br>### Server Environment ###<br><br>Server Info: Apache<br>PHP Version: 8.3.20<br>PHP Post Max Size: 256 MB<br>PHP Time Limit: 120<br>PHP Max Input Vars: 3000<br>cURL Version: 8.9.1<br>OpenSSL/3.2.4<br><br>SUHOSIN Installed: –<br>MySQL Version: 8.0.39-30<br>Max Upload Size: 256 MB<br>Default Timezone is UTC: ✔<br>fsockopen/cURL: ✔<br>SoapClient: ✔<br>DOMDocument: ✔<br>GZip: ✔<br>Multibyte String: ✔<br>Remote Post: ✔<br>Remote Get: ✔<br><br>### Database ###<br><br>[REDACTED]<br><br>### Post Type Counts ###<br><br>amn_mi-lite: 2<br>amn_om: 3<br>attachment: 3377<br>custom_css: 1<br>displayed_gallery: 4<br>display_type: 8<br>envira: 1<br>nav_menu_item: 10<br>nf_sub: 4<br>ngg_album: 2<br>ngg_gallery: 7<br>ngg_pictures: 46<br>page: 439<br>portfolio: 7<br>post: 567<br>product: 42<br>product_variation: 6<br>revision: 6<br>shop_coupon: 1<br>shop_order: 46<br>shop_order_refund: 1<br>ultimate-auction: 9<br>wp_global_styles: 2<br>wp_navigation: 1<br><br>### Security ###<br><br>Secure connection (HTTPS): ✔<br>Hide errors from visitors: ✔<br><br>### Active Plugins (17) ###<br><br>Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick ...: by Nicolas Jonas – 10.6.12<br>Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.7<br>Kit (formerly ConvertKit): by Kit – 2.8.0<br>Envira Gallery Lite: by Envira Gallery Team – 1.10.0<br>Genesis Connect for WooCommerce: by StudioPress – 1.1.2<br>Genesis Custom Footer: by Nuts and Bolts Media – 1.0.1<br>Genesis Grid: by Bill Erickson – 1.4.2<br>Genesis Blocks Pro: by WP Engine – 3.1.7<br>Genesis Simple Hooks: by StudioPress – 2.3.0<br>Genesis Simple Sidebars: by StudioPress – 2.2.3<br>Gravity Forms: by Gravity Forms – 2.9.7.2<br>Gravity Forms Kit Add-On: by Gravity Forms – 1.1.0<br>Redirection: by John Godley – 5.5.2<br>Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.6<br>Speed Optimizer: by SiteGround – 7.7.2<br>WooCommerce: by Automattic – 9.8.3<br>WP Crontrol: by John Blackbourn – 1.19.0<br><br>### Inactive Plugins (7) ###<br><br>NextGEN Gallery: by Imagely – 3.59.12<br>Page Builder by SiteOrigin: by SiteOrigin – 2.31.6<br>Solid Backups – Legacy: by SolidWP – 9.1.16<br>WooCommerce - ShipStation Integration: by WooCommerce – 4.5.1<br>WooCommerce Simple Auction: by wpgenie – 3.0.5<br>WooCommerce Stripe Gateway: by Stripe – 9.4.1<br>WPForms Lite: by WPForms – 1.9.5.1<br><br>### Settings ###<br><br>Legacy API Enabled: –<br>Force SSL: –<br>Currency: USD ($)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: auction (auction)<br>external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: ✔<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: –<br><br>### Logging ###<br><br>Enabled: ✔<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 1 MB<br><br>### WC Pages ###<br><br>Shop base: #27797 - /shop<br>Cart: #27798 - /cart - Contains the woocommerce_cart shortcode<br>Checkout: #27799 - /checkout - Contains the woocommerce_checkout shortcode<br>My account: #27800 - /my-account - Contains the [woocommerce_my_account] shortcode<br>Terms and conditions: ❌ Page not set<br><br>### Theme ###<br><br>Name: Essence Pro<br>Version: 1.5.1<br>Author URL: https://www.studiopress.com/<br>Child Theme: ✔<br>Parent Theme Name: Genesis<br>Parent Theme Version: 3.6.0<br>Parent Theme Author URL: https://www.studiopress.com/<br>Theme type: Classic theme<br>WooCommerce Support: ✔<br><br>### Templates ###<br><br>Overrides: –<br><br>### Admin ###<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>onboarding<br>onboarding-tasks<br>pattern-toolkit-full-composability<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>printful<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br>add-to-cart-with-options-stepper-layout<br><br>Disabled Features: product-data-views<br>experimental-blocks<br>coming-soon-newsletter-template<br>minified-js<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br>use-wp-horizon<br>blockified-add-to-cart<br><br>Daily Cron: ✔ Next scheduled: 2025-05-01 11:47:59 +00:00<br>Options: ✔<br>Notes: 147<br>Onboarding: completed<br><br>### Action Scheduler ###<br><br>Complete: 2<br>Oldest: 2025-04-30 15:10:41 +0000<br>Newest: 2025-04-30 15:10:41 +0000<br><br>Pending: 90<br>Oldest: 2025-04-30 15:10:41 +0000<br>Newest: 2025-04-30 15:10:41 +0000<br><br><br>### Status report information ###<br><br>Generated at: 2025-05-01 10:58:56 +00:00<br>
    </details>

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

Viewing 15 replies - 1 through 15 (of 32 total)
  • Stef

    (@serafinnyc)

    Do you know how to shell in and run CLI commands? You need to go that route @paul-foxton

    If so start with this command first to see which actions are top. Just change the DB prefix if you’re using one. This assumes just wp_

    wp db query "
    SELECT hook, COUNT(*) as count
    FROM wp_actionscheduler_actions
    GROUP BY hook
    ORDER BY count DESC
    LIMIT 10;
    " --allow-root

    Check the total completed

    wp db query "SELECT COUNT(*) FROM wp_actionscheduler_logs;"

    Then clean them (this is safe, no need for them)

    wp action-scheduler clean --status=complete

    Here’s a command to run to see the top 15 Tables that are bloated

    wp db query "
    SELECT
    table_name AS Table_Name,
    ROUND(data_length / 1024 / 1024, 2) AS Data_MB,
    ROUND(index_length / 1024 / 1024, 2) AS Index_MB,
    ROUND(data_free / 1024 / 1024, 2) AS Data_Free_MB,
    ROUND((data_free / (data_length + index_length)) * 100, 2) AS Bloat_Percentage
    FROM information_schema.tables
    WHERE table_schema = DATABASE()
    AND data_free > 0
    ORDER BY data_free DESC
    LIMIT 15;"

    Hope this helps.

    Forgot to add. Check top 10 actions being called the most

    wp db query "
    SELECT hook, COUNT(*) AS total
    FROM wp_actionscheduler_actions
    GROUP BY hook
    ORDER BY total DESC
    LIMIT 10;
    "

    Then check the association

    wp db query "
    SELECT a.hook, COUNT(l.action_id) AS log_count
    FROM wp_actionscheduler_logs l
    JOIN wp_actionscheduler_actions a ON l.action_id = a.action_id
    GROUP BY a.hook
    ORDER BY log_count DESC
    LIMIT 10;
    "

    This will pinpoint which scheduled task is flooding the log table.

    • This reply was modified 1 year ago by Stef.
    Tom Cafferkey

    (@tomjcafferkey)

    We are already aware of this issue and released a fix in 9.8.3 yesterday. I suspect these scheduled actions were getting queued up prior to yesterdays release which prevents further ones getting added.

    My suspicion is that the wp_actionscheduler_actions table will have many duplicate actions for the hook wc_delete_related_product_transients_async with the same args if you want to confirm this suspicion that would be great.

    The following SQL commands should help, if required please replace the wp_ prefix in the table names if they’re different in your own.

    Important: Please do this in a staging environment first. Not production.

    This command will SELECT all of the duplicate pending scheduled actions for the hook wc_delete_related_product_transients_async

    SELECT t1.*
    FROM wp_actionscheduler_actions t1
    INNER JOIN wp_actionscheduler_actions t2
    WHERE
    t1.action_id > t2.action_id
    AND t1.hook = 'wc_delete_related_product_transients_async'
    AND t2.hook = 'wc_delete_related_product_transients_async'
    AND t1.status = 'pending'
    AND t2.status = 'pending'
    AND t1.args = t2.args;

    If you have duplicate actions here you may want to export/save their action_ids so we can also delete them from the wp_actionscheduler_logs table too.

    This command will DELETE all of the duplicate pending scheduled actions for the hook wc_delete_related_product_transients_async

    DELETE t1 FROM wp_actionscheduler_actions t1
    INNER JOIN wp_actionscheduler_actions t2
    WHERE
    t1.action_id > t2.action_id
    AND t1.hook = 'wc_delete_related_product_transients_async'
    AND t2.hook = 'wc_delete_related_product_transients_async'
    AND t1.status = 'pending'
    AND t2.status = 'pending'
    AND t1.args = t2.args;

    And if you have saved the action_id‘s from the SELECT command you can then cleanup the wp_actionscheduler_logs table:

    DELETE FROM wp_actionscheduler_logs
    WHERE action_id IN (123, 456, 789);

    I must stress again though please do this in a staging environment first.

    Since the release of 9.8.3 this should not continue to happen, but please let us know if it does.

    Thread Starter Paul Foxton

    (@paul-foxton)

    Thanks Tom. Unfortunately wc_delete_related_product_transients_async isn’t showing in the wp_actionscheduler_actions table at all.

    There are currently 93 actions pending, of which 6 are from WooCommerce (the rest are from the BackupBuddy plugin, which I’ve deactivated today).

    I have these actions from WooCommerce pending:

    woocommerce_cleanup_draft_orders
    woocommerce_marketplace_fetch_promotions_clear
    woocommerce_run_product_attribute_lookup_regenerat...
    woocommerce_run_on_woocommerce_admin_updated
    woocommerce_marketplace_fetch_promotions_clear
    woocommerce_marketplace_fetch_promotions_clear

    None of these have anything in the args column.

    Edit: I don’t know if this will help, but I’ve checked the first 250 rows of the wp_actionscheduler_logs table and they all have action ignored via Async Request in the message column

    Thread Starter Paul Foxton

    (@paul-foxton)

    Thanks Stef, it’s been many years since I’ve done anything on a server with shell, I wouldn’t be very confident about doing that on a live site now, to be honest! But I can set up a local copy and try that perhaps.

    But I can see the majority of what you recommend in phpMyAdmin, I think. It’s only the wp_actionscheduler_logs table that’s growing so large, so I can see where the problem is. There are only 2 completed tasks in the wp_actionscheduler_actions table.

    Stef

    (@serafinnyc)

    Hey @paul-foxton

    Fair enough. I get it. I think it’s amazing and always my pref. Once you clone the site you’ll be able to get a handle on things and maintain a stable environment.

    IMPORTANT NOTICE: always always always and again always make a backup before doing any of this.

    After going back and rereading your original post, I discovered that you’ve actually got a runaway fetch_patterns action that’s failing repeatedly and flooding your logs. That’s what’s blowing up the wp_actionscheduler_logs table, not a bug with Woo transients.

    To stop the bloat, you can safely delete the stuck fetch_patterns actions. Here’s the SQL:

    DELETE FROM wp_actionscheduler_actions
    WHERE hook = 'fetch_patterns' AND status = 'pending';

    After that you’ll clean up the orphan log:

    DELETE FROM wp_actionscheduler_logs
    WHERE action_id NOT IN (
    SELECT action_id FROM wp_actionscheduler_actions
    );

    If you want to do these in CLI it is:

    wp db query "DELETE FROM wp_actionscheduler_actions WHERE hook = 'fetch_patterns' AND status = 'pending';"

    and

    wp db query \"DELETE FROM wp_actionscheduler_logs WHERE action_id NOT IN (SELECT action_id FROM wp_actionscheduler_actions);"

    That’ll break the loop and stabilize your DB

    • This reply was modified 1 year ago by Stef.
    Zee

    (@doublezed2)

    Hello Paul Foxton.

    Thank you for contacting WooCommerce support.

    I understand you’re facing an issue where the wp_actionscheduler_logs table grows rapidly to over 2GB, even after truncating it.

    To start, please confirm if you’re using the latest version of WooCommerce (currently 9.8.3). If not, update to the latest version and check if the issue continues.

    If the problem persists, I recommend running a conflict test by switching to a default theme like Storefront and disabling all plugins except WooCommerce. This will help identify if a specific plugin is triggering excessive Action Scheduler activity.

    You can also install the WP Crontrol plugin to inspect scheduled events (WP-Cron). It will help reveal if certain actions are repeating abnormally or failing to complete, which could explain the rapid log growth.

    Looking forward to your response. 🙂

    Thread Starter Paul Foxton

    (@paul-foxton)

    @serafinnyc, thanks so much for that, and apologies for the late reply – busy few days. I’ve just run those two SQL queries and truncated the action_scheduler_logs table. I realise that’s taking a bit of a hammer to it, but the second SQL query you gave didn’t return any rows.

    Hopefully this will be it. I’ll check the size of my log table and update tomorrow.

    Thread Starter Paul Foxton

    (@paul-foxton)

    @doublezed2 Thanks for the input, I’d already tried all of those suggestions before posting though. I think the SQL @serafinnyc gave me may have fixed it, will update tomorrow.

    Mahfuzur Rahman

    (@mahfuzurwp)

    Thanks for the update, @paul-foxton! Really appreciate you taking the time to try those steps—and glad to hear the SQL from @serafinnyc might have done the trick. Looking forward to hearing how it goes!

    Thread Starter Paul Foxton

    (@paul-foxton)

    OK, so there are no new entries in the action_scheduler_log table since I ran the SQL from @serafinnyc yesterday. That seems to be fixed. Additionally, I’m no longer getting a critical error when I try to access the page of scheduled actions in the WP admin. Thank you so much Stef!

    I do still have a warning in my WP admin: Action Scheduler: 20 past-due actions found; something may be wrong

    Most of these events are woocommerce_marketplace_fetch_promotions_clear but I suspect that they’re being held up by a action_scheduler/migration_hook which has been sitting there without completing for 10 days. I’m going to just delete that row and see what happens, it seems to be stopping other actions from completing.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    I’m glad to hear that the issue with the action scheduler log and the critical error have been resolved!

    As for the past-due actions warning, it does sound like the action_scheduler/migration_hook could be causing the delays. your plan to delete that stuck migration hook action sounds like a reasonable next step. Sometimes, stuck or incomplete scheduled actions can block other processes from running smoothly.

    Afterward, keep an eye on things to see if any new issues arise.

    Let me know how it goes, and feel free to reach out if you need further assistance!

    Stef

    (@serafinnyc)

    Hey @paul-foxton glad to hear you’re getting to the bottom of things. If things are past due you have the option of running them. But it’s best to check those first because often times they can be subscriptions or something that just haven’t come to their renewal date. So it’s normal.

    I’m not on here that often since retirement, but I’ll try and answer when I get a chance.

    Zee

    (@doublezed2)

    Hello Stef,

    Thank you for your valuable contribution to the WooCommerce support forum. We truly appreciate your effort in helping fellow community members and sharing your knowledge with others.

    Paul Foxton, we’d love to hear back from you. Please also check our previous reply and let us know about your findings.

    Have a great day!

    Thread Starter Paul Foxton

    (@paul-foxton)

    I deleted the stuck action_scheduler/migration_hook but unfortunately the problem isn’t resolved, I’m still having to manually truncate the logs table on a daily basis.

    It’s beyond my ability to sort out at this point I think, so I’m just going to remove woocommerce completely, hopefully that will fix it. Unfortunately leaves with the problem of not being able to sell anything on my site, whicih is not so good! But I may try re-installing it later with a fresh install if the problem goes away when I’ve removed it.

    Frustrating result, but I very much appreciate people trying to help me sort it, thank you.

    Hi @paul-foxton,

    Fantastic! Thanks for sharing your next steps. Sometimes, issues like this can be resolved by disconnecting and reinstalling WooCommerce. I completely understand how frustrating that can be—especially when it disrupts your ability to sell on your site, which can feel overwhelming.

    If you decide to go ahead with the reinstallation, I recommend doing it manually by downloading the plugin directly from ww.wp.xz.cn. But before that, it would be better to optimize your database using a plugin like WP-Optimize to clear any unnecessary data and reduce the chance of recurring issues.

    Looking back at your initial message, it’s clear that the main issue stems from a runaway scheduled action (fetch_patterns). While the suggestions so far have been helpful, I can’t help but think that something must be triggering this—possibly a theme component, a block, or another plugin.

    You previously mentioned running a conflict test, but I didn’t see a staging site or detailed results that show a thorough investigation.

    Of all the plugins currently active, one that stands out as a potential culprit is Genesis Blocks Pro by WP Engine. This plugin supports block patterns and pattern libraries and registers scheduled actions like fetch_patterns to periodically pull in design elements. If that process fails—due to API limits, database issues, or server restrictions—it can retry indefinitely, causing the kind of log overload you’re experiencing.

    If you’re open to digging further into this, I’d suggest the following:

    • Temporarily deactivate and delete Genesis Blocks Pro.
    • Clear all related log entries from your database using the previous steps shared.
    • Optimize your database again using WP-Optimize to remove any leftover data or tables from the plugin.
    • Then monitor the site to see if the issue reappears.
Viewing 15 replies - 1 through 15 (of 32 total)

The topic ‘Critical Error in ActionScheduler_DBStore.php’ is closed to new replies.