• Resolved tddjaved

    (@tddjaved)


    Hello,

    The client has complained about the speed of the website, the live website is https://victoriancornice.co.uk/ but I have a replica of the website setup as a staging website that I am working on for debugging.

    The staging website that is on the same server seems to be running quicker than the live website, not sure why.

    I have checked the logs on the server and keep coming across the following error which I believe could be a major part of the website being slow.

    PHP Fatal error: Uncaught RuntimeException: Unable to release actions from claim id 0. in /wordpress/plugins/woocommerce/9.3.1/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1042 Stack trace: #0 /wordpress/plugins/woocommerce/9.3.1/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(406): ActionScheduler_DBStore->release_claim(Object(ActionScheduler_ActionClaim)) #1 /wordpress/plugins/woocommerce/9.3.1/packages/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php(52): ActionScheduler_HybridStore->release_claim(Object(ActionScheduler_ActionClaim)) #2 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(324): ActionScheduler_FatalErrorMonitor->handle_unexpected_shutdown('') #3 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /wordpress/core/6.6.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /wordpress/core/6.6.2/wp-includes/load.php(1280): do_action('shutdown') #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /wordpress/plugins/woocommerce/9.3.1/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 1042

    Pastebin of the system report

    Let me know if there is anything else I can provide to assist.

    Thank you,
    Javed

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tddjaved

    (@tddjaved)

    I’ve had the following from the hosting company;

    We're seeing a quite a few tables that are very large and don't have a primary key in the table defined. This can lead to spending a LOT of time looping through data in the database to retrieve the data that's used to render pages. Here are some examples of very large tables that don't have a primary key set for any of the columns:

    wp_h5_actionscheduler_logs - ~294,749 rows

    wp_h5_404_to_301 - ~708,433 rows

    wp_h5_comments - ~99,123 rows

    wp_h5_commentmeta - ~45,750 rows

    wp_h5_fg_redirect - ~24,378 rows

    wp_h5_actionscheduler_groups - ~20,961 rows

    wp_h5_actionscheduler_actions - ~19,623 rows

    wp_h5_gla_budget_recommendations - ~8,506 rows

    wp_h5_facetwp_index - ~7,605 rows

    wp_h5_defender_lockout_log - ~466 rows

    We would suggest cleaning up these tables either by truncating them if they can be completely cleaned or for the ones where you need the data, check to see if any old data can be removed. Then I would suggest working with a developer to add in some primary keys to some of these tables which should help to speed up searching these tables for data needed when the pages are being built. Additionally, we're seeing some very large autoloaded options, specifically for wphb_scripts_collection. If these aren't needed on every page load, you can turn autoload off for these so that they're only being loaded on pages where they're needed. Please review this info and work on cleaning up the data mentioned and then let us know if you're still seeing issues with 504 timeouts when trying to load pages.

    Ok, so my questions;

    1. What is the best and safest way of adding a primary key to the following tables? Approach?
    2. wphb_scripts_collection – autoload, how do I turn off autoload?

    Thanks,
    Javed

    Thread Starter tddjaved

    (@tddjaved)

    Massive difference made to sorting out the tables mentioned, the backend and frontend seems to be running quicker now.

    I have the following tables to repair and optimise and hopefully will give the site a further speed lift!

    wp_h5_commentmeta – ~45,750 rows
    wp_h5_fg_redirect – ~24,378 rows
    wp_h5_gla_budget_recommendations – ~8,506 rows
    wp_h5_facetwp_index – ~7,605 rows
    wp_h5_defender_lockout_log – ~466 rows

    Thanks,
    Javed

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello tddjaved.

    Thank you for contacting Woo support.

    I appreciate the detailed information you shared about the issue and the actions you’ve taken so far.

    Please note that the following WordPress and WooCommerce tables should have a Primary Key:
    – wp_actionscheduler_logs → log_id
    – Table: wp_comments → comment_ID
    – wp_commentmeta → meta_id
    – wp_actionscheduler_groups → group_id
    – wp_actionscheduler_actions → action_id

    Other mentioned tables belong to 3rd party plugins and they should also have a Primary Key.
    You may contact respective plugin support for confirmation.

    I want to confirm a couple of things before moving forward.
    Have you made any performance-related changes on the staging site?
    If so, could you share which actions specifically resulted in the improvement you noticed?
    I am asking to confirm where we stand at this point so I can guide you further.

    Looking forward to your response. ??

    Best regards.

    Thread Starter tddjaved

    (@tddjaved)

    Hi @doublezed2

    The performance related changes on the staging website was to remove any disabled plugins, update the WooCommerce templates that were outdated and then setting the primary key on the required WooCommerce action scheduler tables, then I removed the failed actions and, cleared the cache on the server and let the action scheduler run through the backlog.

    I also cleared the database of any revisions etc and it seems to be working fine now. I also turned off the autoload option for the theme.

    The other tables mentioned I am yet to look at setting the primary key on it.

    In terms of WooCommerce, I don’t think I have anything further to add to this thread. If I do, then I will repost back here.

    Thanks,
    Javed

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @tddjaved,

    Thank you for sharing the detailed steps you took to optimize your site’s performance on the staging website.

    I will mark this thread as resolved now. Should you have further inquiries, kindly?create a new topic here.

    If you have a few minutes, we’d love if you could leave us a review: https://www.ads-software.com/support/plugin/woocommerce/reviews/

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.