• Resolved kraken2k

    (@kraken2k)


    The Event Calendar is flooding PHP error log with the following messages every single minute:

    sitename [Mon Oct 20 13:21:27.226397 2025] [php:notice] [pid 708] [client 10.31.16.14:34640] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SKIP LOCKED ) t2 ON t1.action_id = t2.action_id SET claim_id=1097345, last_at…' at line 1 for query UPDATE wp_actionscheduler_actions t1 JOIN ( SELECT action_id from wp_actionscheduler_actions WHERE claim_id = 0 AND scheduled_date_gmt <= '2025-10-20 11:21:27' AND status='pending' ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC LIMIT 25 FOR UPDATE SKIP LOCKED ) t2 ON t1.action_id = t2.action_id SET claim_id=1097345, last_attempt_gmt='2025-10-20 11:21:27', last_attempt_local='2025-10-20 13:21:27' made by do_action_ref_array('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_DBStore->stake_claim, ActionScheduler_DBStore->claim_actions

    sitename [Mon Oct 20 13:21:27.226457 2025] [php:error] [pid 708] [client 10.31.16.14:34640] PHP Fatal error: Uncaught RuntimeException: Unable to claim actions. Database error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SKIP LOCKED ) t2 ON t1.action_id = t2.action_id SET claim_id=1097345, last_at…' at line 1. in /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1019\nStack trace:\n#0 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(861): ActionScheduler_DBStore->claim_actions(1097345, 25, NULL, '', '')\n#1 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(179): ActionScheduler_DBStore->stake_claim(25)\n#2 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(158): ActionScheduler_QueueRunner->do_batch(25, 'WP Cron')\n#3 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-includes/class-wp-hook.php(324): ActionScheduler_QueueRunner->run('WP Cron')\n#4 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)\n#5 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)\n#6 /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-cron.php(191): do_action_ref_array('action_schedule…', Array)\n#7 {main}\n thrown in /data/a/6/a6d583ee-ca2c-4f21-acbb-72f6e39e457d/sitename/www/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 1019

    WordPress: 6.8.3
    PHP: 8.4
    Database: MariaDB 10.5
    The Event Calendar: 6.15.8

    WooCommerce is NOT present and was never installed on this site.

    Any idea how to prevent this error and log flooding? (disabling the log is not a solution)

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @kraken2k ,

    Thank you for reaching out.

    I suspect there’s a conflict that’s causing the issue here. It would be good to test for conflicts. Could you follow the steps below?

    1. Deactivate all other plugins except for The Events Calendar Plugins.
    2. Switch to the Default theme.

    Please read the Testing for Conflicts article before doing anything. 
    To be safe, we’d recommend conducting tests and updates on a Staging Server. Also, please keep a working backup of your website.

    Plugin Support Darian

    (@d0153)

    Hi @kraken2k

    I just wanted to check if you’ve had a chance to try the recommendation above. If the issue persists, please consider upgrading MariaDB to version 10.6 to see if that resolves the problem.

    As always, we recommend testing the change first on your staging site or ensuring you have a full backup of your live site before proceeding.

    Please let us know how it goes!

    Thread Starter kraken2k

    (@kraken2k)

    Hi, I tried to disable all other plugins and switch do default theme (Twenty Twenty-Five) as instructed, but the problem still persist with the same error message.

    Upgrading database to 10.6 is not possible as this is shared webhosting service and since all other plugins are running without any issues or errors, I think this is not an issue.

    From what I can say, the error is related to the Cron tasks created by The Event Calendar – the exception is thrown when the Cron task launching script from wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php is executed (it does not make any sense anyway, because as I wrote before, WooCommerce was never installed on this site).

    Plugin Support tristan083

    (@tristan083)

    Hi @kraken2k ,

    Thank you for your message, and the information.

    I acknowledge that WooCommerce was never installed on your site.

    It appears this issue isn’t common, and I was able to find some past reports about this suggesting some discrepancies in the following tables. Could you please have a look and ensure they have the columns and structure (i.e., AUTO_INCREMENT) per the screenshots linked beside each table listing?

    Thread Starter kraken2k

    (@kraken2k)

    Hi, I checked the structure of these table and they seem to be the same as on the screenshots you posted. Here are screenshots from phpMyAdmin running on the database used by my website:

    wp_actionscheduler_actions: https://imgur.com/uhLu2tG
    wp_actionscheduler_claims: https://imgur.com/AMvpzg9
    wp_actionscheduler_groups: https://imgur.com/coci7NW

    Plugin Support tristan083

    (@tristan083)

    Hi @kraken2k ,

    Thank you for your message and the information.

    In further investigating the matter, I’m afraid this issue boils down to your database version not supporting the SKIP LOCK command (see https://jira.mariadb.org/browse/MDEV-13115).

    What is happening? The Events Calendar is trying to run background tasks using a component called Action Scheduler. This component was built by WooCommerce, as an open source library to manage scheduled tasks like sending email reminders, clearing old data, etc. Thus, you do not need to have WooCommerce installed and activated on your site, as the library is bundled with The Events Calendar.

    How is it failing? When Action Scheduler tries to find and “claim” tasks from the database, it uses a modern SQL command called SKIP LOCKED. This command is essential for high-traffic sites to prevent tasks from running multiple times or getting stuck.

    The Error: Your database server, which is MariaDB version 10.5, does not have support for the SKIP LOCKED command per the JIRA link above. So, it does not understand the SKIP LOCKED command thus throw a “syntax error.”

    Plugin Support Darian

    (@d0153)

    Hi @kraken2k

    Just checking in to see if you’ve had a chance to try out the suggestion above. You might also want to share the details with your hosting provider so they understand the reason for the database upgrade. If you have any other questions or need more help, we’re always here for you!

    Plugin Support Darian

    (@d0153)

    Hi there,

    It looks like we haven’t heard back from you in a while, so I’ll go ahead and close this thread for now.

    If you still need assistance, feel free to reopen this thread or start a new one

    Thread Starter kraken2k

    (@kraken2k)

    I moved the DB to MariaDB 11.4 with the assistance of webhosting support and the issue seems to be gone.

    Thank you for the support!

    Plugin Support Darian

    (@d0153)

    Hi @kraken2k ,

    Thanks for your confirmation and I’m glad that it is now working.

    If you have a minute, a great review from you would be amazing!

    https://wordpress.org/support/plugin/the-events-calendar/reviews/

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

The topic ‘WP database errors – syntax error in ActionScheduler_DBStore.php’ is closed to new replies.