Skip to content

Action Scheduler async queue crashes on WordPress 5.3 with wpdb::db_server_info() error #1361

Closed

Description

@pirate-bot

Summary

Visualizer's background Action Scheduler queue can terminate with an uncaught Call to undefined method wpdb::db_server_info() error during an AJAX request on WordPress 5.3.

Expected behavior: Scheduled actions are claimed and processed without a fatal error on supported WordPress environments.

Actual behavior: The async queue runner reaches the database claim path and throws before processing the batch.

Impact: Automatic background processing is interrupted for the affected site and request.

Customer context

  • Product / area: Visualizer background auto-sync / bundled Action Scheduler
  • Version: 4.0.7
  • Environment: WordPress 5.3.21, PHP 7.4.33
  • Integration / third party: Bundled woocommerce/action-scheduler 3.9.3
  • Reported error / symptom: Error: Call to undefined method wpdb::db_server_info() during an AJAX queue-runner request
  • Impact: 14 telemetry occurrences across one distinct site between 2026-07-31 20:01 UTC and 23:35 UTC.

Reproduction notes

  1. Install Visualizer 4.0.7 on WordPress 5.3.21 with PHP 7.4.33.
  2. Trigger the Action Scheduler async queue runner through its AJAX request path.
  3. When ActionScheduler_DBStore::claim_actions() checks database locking support, the reported production run throws Call to undefined method wpdb::db_server_info().

Reproduction is supported by the production stack trace; no local runtime reproduction was performed because the bundled vendor/ directory is absent from this checkout.

Diagnosis

Conclusion

Production telemetry provides a direct stack trace from Visualizer's bundled Action Scheduler path: ActionScheduler_DBStore::db_supports_skip_locked() throws because it calls wpdb::db_server_info() on WordPress 5.3.21. The Visualizer 4.0.7 release locks Action Scheduler 3.9.3, and an inspected copy of that exact dependency version contains the unconditional call. This is a confirmed compatibility defect in the shipped dependency path, not Themeisle SDK code.

Where this likely occurs

  • vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php — ActionScheduler_DBStore::db_supports_skip_locked() lines 1038-1042 in the inspected Action Scheduler 3.9.3 copy; it obtains $wpdb->db_version() and then unconditionally calls $wpdb->db_server_info(). Telemetry identifies the equivalent bundled Visualizer file at line 1041.
  • composer.lock — Action Scheduler package record lines 181-221 locks version 3.9.3 at reference c58cdbab17651303d406cd3b22cf9d75c71c986c; v4.0.7 contains the same lock entry.
  • index.php — Visualizer bootstrap lines 148-157 loads vendor/autoload.php and the bundled Action Scheduler entry point when present.
  • classes/Visualizer/Plugin.php — Visualizer_Plugin::VERSION line 31 identifies the checked release as 4.0.7.
  • Git commit bc14d4b8acebefc167ef51601a4898fb302d0b71 introduced the Action Scheduler dependency and bootstrap under “Replace WP-Cron with Action Scheduler for reliable auto-sync”; the telemetry is from the later v4.0.7 tag.

Engineering notes

  • The error occurs while ActionScheduler_DBStore::claim_actions() evaluates whether SKIP LOCKED is supported, before the queue batch is processed.
  • The reported request context is AJAX and the stack continues through ActionScheduler_AsyncRequest_QueueRunner, matching Visualizer's bundled async dependency loading path.
  • WordPress core source was not present in the inspected workspace, so the absence of wpdb::db_server_info() on WordPress 5.3.21 is established by the production exception rather than a local core-source check.
  • The telemetry names no Themeisle SDK frame and explicitly marks the crash as outside SDK code.

Test coverage status

tests/test-schedule.php covers Visualizer scheduled/background import behavior, including an unauthenticated background invocation, but does not exercise Action Scheduler queue claiming or the db_supports_skip_locked() compatibility branch. No relevant Action Scheduler compatibility coverage was found during inspection.

What to verify or explore next

  • Reproduce the async queue-runner request with Visualizer 4.0.7, WordPress 5.3.x, and the bundled dependency.
  • Check the Action Scheduler version range supported by Visualizer's released WordPress compatibility policy.
  • Run the existing scheduler test suite and a queue-claim integration scenario against WordPress 5.3.x and currently supported WordPress versions.

Unknowns / follow-up

  • Telemetry covers one site, so the prevalence across other WordPress 5.3 installations is unknown.
  • The customer site's database engine and version were not included in the crash report.

Confidence

Confidence: 98/100

Production telemetry records 14 AJAX crashes in Visualizer 4.0.7 on WordPress 5.3.21, and the release locks the stack frame's Action Scheduler 3.9.3 dependency whose inspected db_supports_skip_locked() implementation directly calls the unavailable wpdb::db_server_info() method.

Crash telemetry

Occurrences 14
Distinct sites 1
First seen 2026-07-31 20:01 UTC
Last seen 2026-07-31 23:35 UTC
Crash location product:vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1041
Request context ajax
Inside Themeisle SDK no
Product versions 4.0.7
WP versions 5.3.21
PHP versions 7.4.33
SDK versions 3.3.57

Source: automated crash report — visualizer, fingerprint 28da1fdfc9908565fa3b3beaadc83288
Generated by bug-report-triage (ID: bug-report-triage_6a6d8b7c4b6548.22981080)

Activity

  1. added theissue type on Aug 1, 2026
  2. girishpanchal30 commented on Sep 9, 2026

    @girishpanchal30
    Contributor

    I have fixed it with this PR #1376

  3. poonam279 commented on Sep 10, 2026

    @poonam279

    🤖 Automated QA Repro Steps

    On WordPress older than 5.5, Visualizer's bundled background scheduler crashes with a fatal Call to undefined method wpdb::db_server_info() as soon as it tries to pick up its queue during an admin-ajax request. Chart auto-sync stops running on that site, and the fatal repeats on every queue run.

    Requires: a WordPress 5.3.x or 5.4.x site (PHP 7.4) — the crash only happens on WordPress below 5.5.

    Reproduce on Visualizer 4.0.7 / WordPress 5.3.x:

    1. Install Visualizer 4.0.7 on the WordPress 5.3.x site and activate the Query Monitor plugin (or turn on debug logging) so fatals are visible.
    2. Create a chart from an external data source (CSV/JSON URL) and give it an auto-refresh schedule.
    3. Load wp-admin a few times so the background queue runs, then check the log / Query Monitor.
    • Bug: Error: Call to undefined method wpdb::db_server_info() in an admin-ajax request, and the scheduled refresh never processes — the chart's data stays stale.
    • Fixed: no fatal. On that WordPress version the bundled scheduler is not loaded at all and the refresh is carried by WP-Cron instead, so the chart data does update on schedule.
    Edge cases
    • Same site on WordPress 5.5+ — the bundled scheduler still loads and Tools → Scheduled Actions still lists Visualizer's visualizer_schedule_refresh_db action.
    • A site that already ran on WordPress 5.5+ and is then rolled back to 5.3 — the WP-Cron event is re-armed, so auto-sync keeps working (confirm with WP Crontrol).
    • Change a chart's refresh interval on WordPress 5.3 — the new interval takes effect and the refresh still runs.
    • Deactivate and reactivate Visualizer on WordPress 5.3 — no fatal, and the schedule is recreated.
    • Open a chart in the block editor whose settings were never saved (a brand-new chart) — the Visualizer block loads normally with no warning.

    Fix: #1376 (open)

  4. pirate-bot commented on Sep 19, 2026

    @pirate-bot
    ContributorAuthor

    Automated crash telemetry captured this again: 198 occurrence(s) across 1 site(s), last seen 2026-09-19 03:49 UTC.

    On WordPress 5.3 sites, Visualizer's background Action Scheduler queue terminates with an uncaught Call to undefined method wpdb::db_server_info() error during AJAX requests. This occurs because the bundled woocommerce/action-scheduler 3.9.3 dependency invokes $wpdb->db_server_info() without checking capability in ActionScheduler_DBStore::db_supports_skip_locked(), which is missing in WordPress 5.3. This can be reproduced by triggering Visualizer 4.0.8's asynchronous queue runner on WordPress 5.3.23 or 5.3.24.


    Source: automated crash report — visualizer, fingerprint 2fddcfe6948d772a5979e1cf888ab2ee
    Generated by bug-report-triage (ID: bug-report-triage_6aae255d028797.92182432)

  5. pirate-bot commented on Sep 26, 2026

    @pirate-bot
    ContributorAuthor

    Another customer reported this via support.

    The background Action Scheduler queue in Visualizer 4.0.7 terminates with an uncaught Call to undefined method wpdb::db_server_info() in vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php at line 1041. This occurs because Visualizer unconditionally loads the bundled Action Scheduler 3.9.3 without checking if the active wpdb exposes db_server_info(), interrupting scheduled background work. To reproduce, install Visualizer 4.0.7 in an environment where the active wpdb lacks db_server_info() and allow the Action Scheduler async queue runner to claim scheduled actions.


    Source: automated uninstall feedback — visualizer, 2026-09-25
    Generated by bug-report-triage (ID: bug-report-triage_6ab75192385ba4.00348008)

  6. pirate-bot commented on Sep 27, 2026

    @pirate-bot
    ContributorAuthor

    Automated crash telemetry captured this again: 1286 occurrence(s) across 1 site(s), last seen 2026-09-27 00:11 UTC.

    Customers experience a fatal error that interrupts scheduled background processing when a cron queue run terminates during database locking checks. The root cause is an unconditional call to $wpdb->db_server_info() in ActionScheduler_DBStore::db_supports_skip_locked() at vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1041, which fails because the method is unavailable on active third-party database wrappers such as W3 Total Cache's W3TC\DbCache_WpdbNew used alongside older WordPress environments like version 5.3.2.


    Source: automated crash report — visualizer, fingerprint 65b00db2b639b5c4a92de1d6d258c094
    Generated by bug-report-triage (ID: bug-report-triage_6ab8b16a4fe2c0.33812972)

  7. pirate-bot commented on Sep 30, 2026

    @pirate-bot
    ContributorAuthor

    🎉 This issue has been resolved in version 4.0.9 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  8. added
    releasedIndicate that an issue has been resolved and released in a particular version of the product.
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions