PHP Fatal error Class “RankMath\Redirections\DB” not found and Deadlock

#1062507
  • Resolved Inga
    Rank Math free

    Hello,

    Today I encountered two critical issues with the Rank Math plugin on my website:

    1. PHP Fatal Error – Deadlock (Action Scheduler)

    [05-Jul-2025 10:16:45 UTC] PHP Fatal error: Uncaught RuntimeException: Unable to claim actions. Database error: Deadlock found when trying to get lock; try restarting transaction. in /wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1016
    Stack trace:
    #0 /wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(861): ActionScheduler_DBStore->claim_actions(2619018, 25, NULL, ”, ”)
    #1 /wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(179): ActionScheduler_DBStore->stake_claim(25)
    #2 /wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(158): ActionScheduler_QueueRunner->do_batch(25, ‘Async Request’)
    #3 /wp-includes/class-wp-hook.php(324): ActionScheduler_QueueRunner->run(‘Async Request’)
    #4 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
    #5 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #6 /wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php(48): do_action(‘action_schedule…’, ‘Async Request’)
    #7 /wp-content/plugins/woocommerce/includes/libraries/wp-async-request.php(147): ActionScheduler_AsyncRequest_QueueRunner->handle()
    #8 /wp-includes/class-wp-hook.php(324): WP_Async_Request->maybe_handle(”)
    #9 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
    #10 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #11 /wp-admin/admin-ajax.php(207): do_action(‘wp_ajax_nopriv_…’)
    #12 {main}

    2. PHP Warnings and Fatal Error – Missing File / Class

    [05-Jul-2025 12:24:19 UTC] PHP Warning: include(/wp-content/plugins/seo-by-rank-math/vendor/composer/../../includes/modules/redirections/class-db.php): Failed to open stream: No such file or directory in /wp-content/plugins/query-monitor/vendor/composer/ClassLoader.php on line 576
    [05-Jul-2025 12:24:19 UTC] PHP Warning: include(): Failed opening ‘/wp-content/plugins/seo-by-rank-math/vendor/composer/../../includes/modules/redirections/class-db.php’ for inclusion (include_path=’…’) in /wp-content/plugins/query-monitor/vendor/composer/ClassLoader.php on line 576
    [05-Jul-2025 12:24:19 UTC] PHP Fatal error: Uncaught Error: Class “RankMath\Redirections\DB” not found in /wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php:244
    Stack trace:
    #0 /wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(114): RankMath\Redirections\Redirector->everything()
    #1 /wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php(81): RankMath\Redirections\Redirector->flow()
    #2 /wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirections.php(118): RankMath\Redirections\Redirector->__construct()
    #3 /wp-includes/class-wp-hook.php(324): RankMath\Redirections\Redirections->do_redirection(Object(WP))
    #4 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #5 /wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #6 /wp-includes/class-wp.php(835): do_action_ref_array(‘wp’, Array)
    #7 /wp-includes/functions.php(1342): WP->main(”)
    #8 /wp-blog-header.php(16): wp()
    #9 /index.php(17): require(‘/wp-blog-header.php’)
    #10 {main}
    thrown in /wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-redirector.php on line 244
    Can you please advise what could be causing these issues and how to resolve them?
    I have not made any recent changes to the plugin files, and all updates are current.

    If you need further logs or more details, please let me know.

    Thank you for your support!

    Best regards,
    Inga

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    We apologize for the issues you are facing with the Rank Math plugin. The PHP Fatal error and deadlock you are encountering are related to the Action Scheduler, which is used by Rank Math for scheduling tasks.

    Here are some steps you can take to resolve the deadlock issue:

    1. Check for Plugin Conflicts: Sometimes, other plugins can interfere with the Action Scheduler. Try deactivating other plugins one by one to see if the issue persists.

    2. Optimize Database: Ensure your database is optimized. You can use a plugin like WP-Optimize or similar to clean up and optimize your database tables.

    3. Increase Database Lock Timeout: If you have access to your database settings, consider increasing the lock timeout settings in your MySQL configuration. This can help reduce deadlocks.

    4. Repair Action Scheduler: You can use our Repair Action Scheduler plugin to fix issues related to the Action Scheduler. You can find it here: Repair Action Scheduler Plugin. Follow the instructions on that page to download and install it.

    5. Clear Cache: If you are using any caching plugins, clear the cache after making changes to ensure that they take effect.

    6. Check Scheduled Actions: Go to WordPress Dashboard → Tools → Scheduled Actions to see if there are any pending actions that need to be run manually.

    If these steps do not resolve the issue, please reply to this ticket with your website URL so that a human agent from our support team can assist you further. Thank you for raising this concern, and we appreciate your patience as we work to resolve it!

    Sources:
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    1. Deadlock errors occur when multiple functions try to update the same areas of the database at the same time. By looking at the logs, it seems like your ActionScheduler tables are getting filled with data and causing issues with the database server.

    ​​​​​​​In this case, you can get in touch with your hosting provider and ask them to increase the limits of the database server. If they’re unable to do that, the only other option might be to do a cleanup on those tables related to ActionScheduler so that the deadlock no longer exists.

    2. Please try reinstalling the Rank Math plugin and see if the issue is resolved. You won’t lose any existing settings data as the settings are saved in the database.

    Let us know how that goes. Looking forward to helping you.

    Inga
    Rank Math free

    Thank you for your previous recommendations.

    First I followed the instructions from your support bot and tried to use the Repair Action Scheduler plugin. However, this did not work, because I received the following message:

    “The Repair Action Scheduler could not run because the repair database schema is obsolete.
    No actions performed.
    The Repair Action Scheduler plugin has been automatically deactivated.”

    Could you please advise on the next steps? The suggested solution is not working due to this issue.

    Also, you mentioned that I should contact my hosting provider to increase the database server limits.
    Could you specify exactly which parameters I should ask the admin to increase? I am not sure which settings (such as memory, timeout, max connections, etc.) are most relevant to solving the deadlock and ActionScheduler issues.

    Thank you in advance for your help.

    Best regards,
    Inga

    Hello,

    Please ensure that Rank Math is fully updated, as missing files can often result from incomplete updates.

    The “Repair Action Scheduler” error usually occurs if another plugin is using an outdated version of the ActionScheduler library. Please follow this guide to check for plugin conflicts: https://rankmath.com/kb/check-plugin-conflicts/

    Regarding the database deadlock issue, you can ask your hosting provider to review and possibly increase the following MySQL parameters:

    innodb_lock_wait_timeout
    innodb_buffer_pool_size
    max_connections
    wait_timeout

    These adjustments can help prevent deadlocks and improve overall database handling.

    Let us know how that goes. Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘PHP Fatal error Class “RankMath\Redirections\DB” not found and Deadlock’ is closed to new replies.