• Resolved zudofeathers

    (@zudofeathers)


    We are 2 people with each a separate account. We currently have a problem where one of the accounts can’t go to the “orders” overview page because it is infinite loading and then we get a 503 bad gateway, error. Most likely because it takes the browser to much time to navigate to the page or something.
    On the other account we have however everything works fine. It’s a bit slow compared to before but that could just be because it has to gather more data then it did before, so that’s fine.
    But on the first account as I mentioned it doesn’t work.
    They both have the same rol. So I don’t think that could be the problem.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author alx359

    (@alx359)

    Hi @zudofeathers , thanks for the report. 503 errors may happen because something is draining the resources of the server and it becomes temporarily unresponsive. This plugin just puts an extra column to the WC orders page, and if WC works fine enough, it shouldn’t be causing much extra overhead. Have you tried inspecting with our plugin off and see if there’s a difference in both accounts? Also, look for JS errors in the browser console (Firefox: rclick > Inspect) that might hint at something. Other possibility is a plugin conflict. A good approach to debug these is enabling “troubleshooting mode” with this plugin, and enabling WC + suspected plugins one by one with a default theme. HTH.

    Thread Starter zudofeathers

    (@zudofeathers)

    @alx359 Thanks for your quick responds!
    I did some investigation.
    It is a 504 mistyped it sorry.
    The only console log I get is the following: “Failed to load resource: the server responded with a status of 504 ()”

    And the following is on my screen: “504 Gateway Time-out
    The server didn’t respond in time.”

    The only difference I can find between the 2 are, the user information and one of the accounts has these additional rights: “edit_wplc_quick_response, edit_other_wplc_quick_response, publish_wplc_quick_response, read_wplc_quick_response, read_private_wplc_quick_response, delete_wplc_quick_response”

    Btw, I tried turning the plugin off and then everything works fine. So that’s the reason for me posting this topic in the first place.

    I also tested on a different domain (used a backup so same exact same website) that we have under construction, there it does “work”. It gets to the order page after almost 3 minutes of loading, I guess on the live enviourment it just throws a 504 because it’s taking to long. If I remember correctly the browser will autmaticlly throw a 504 if it takes to long. But now the question is Why does it take so long with the plugin active.

    On the other domain I also tried turning off plugins 1 by 1 but still the same issue remains.

    When reaching the orders page I get the warning in the chat: `wp.compose.withState is deprecated. Please use wp.element.useState instead.
    i @ deprecated.min.js?ver=8778985ac0dfb16f24f8ef86d0718f43:2
    w @ compose.min.js?ver=058697a4c5024045c81954f411ff6dba:2
    (anonymous) @ index.js?ver=3.1.0:2
    n @ index.js?ver=3.1.0:2
    (anonymous) @ index.js?ver=3.1.0:2
    (anonymous) @ index.js?ver=3.1.0:2`

    But I always get this one so I dont think it has anything to do with it.

    • This reply was modified 3 years, 1 month ago by zudofeathers.
    Plugin Author alx359

    (@alx359)

    From a quick googling for edit_wplc_quick_response, you seem to be using 3CX Live Chat plugin. Also bumped into reports like this about incompatibilities with other plugins.

    wp.element.useState appears to belong to the Gutenberg Block Editor.

    Anyway, this still feels like a plugin incompatibility issue. Please consider the suggested debug procedure in my previous post with the Health Check & Troubleshooting plugin.

    Thread Starter zudofeathers

    (@zudofeathers)

    Thanks for your feedback, I’ll look into it!

    One last thing I noticed.
    I think I have an idea where the issue is coming from. I think it has something to do with our database and the way the plugin queries data from the database.
    The account that is not working correctly is the account we use to finish our orders. This only creates more links in the database which will make querying the data even longer. I think this is the reason it is taking so long to retrieve the data and thus the reason the browser throws a 504 error.

    This is also the reason why after installing for all other accounts it takes longer to load the orders page. What do you think about this possibility?

    Plugin Author alx359

    (@alx359)

    The plugin does perform some additional queries to build the historical view of the orders, but they’re all inside the WP/WC infrastructure. It also tries to reuse the same queries that have already been fetched by WC for other things. Here’s a relevant piece of the code, for example:

    \plugins\order-status-history-for-woocommerce\includes\class_osh.php line ~283

    public function add_orders_table_column_custom__orders_history( $column, $order_id ) {
            
            # [optimization] get order data from the loop, instead of calling wc_get_order on every row
            # https://stackoverflow.com/questions/48908754
            global $post, $the_order;
            if ( empty( $the_order ) || $the_order->get_id() != $post->ID ) {
                   $customer_order = wc_get_order( $post->ID );
            } else $customer_order = $the_order;

    IMO, if your server has enough resources already for the kind of usage you’re currently having w/o the plugin, it by itself shouldn’t be adding a major overhead.

    I of course could be wrong and be missing something, but frankly, I’ll have to experience it myself to be able to figure it out.

    Thread Starter zudofeathers

    (@zudofeathers)

    For anyone that has the same issue in the future.
    2 things I did helped a lot.
    First of all at the top of your orders page you have the screenoptions. In my case on one of the account it was 20 orders which worked good enough, on the other account it was set to 300.
    Other then that downloading the wp-optimation plugin helps a lot with cleaning your db on old data etc.

    I haven’t tried this myself but can imagine that it also helps to upgrade your php or mysql version on your hosting platform.

    @alx359 Thanks for your help!

    Plugin Author alx359

    (@alx359)

    Hi @zudofeathers
    Just updated the plugin to version 1.8. A query cache via transients was implemented, so it should be significantly faster and utilize less resources now. May give it a try and report back how well it works for you. Thanks.

    Thread Starter zudofeathers

    (@zudofeathers)

    Hi @alx359,

    Sorry I forgot to get back to you. I updated it and it indeed works way faster. I did a small performance measure and at my side it was about 4 times as fast. Thanks for the great update and plugin ofcourse ??

    Plugin Author alx359

    (@alx359)

    Thanks, @zudofeathers for the feedback. Glad to know the plugin is working now better for you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘infinite loading of orders page’ is closed to new replies.