Order Attribution breaks site with large number of orders
Hello,
Just spend literal days debugging this, and I assume you’re aware, but here’s some more info that you might not have.
Some (and only some) customers on a very busy store (35k orders/year) are causing their new orders to max out the PHP memory allocation (512MB) when they go to process payment. Upon digging in the log, our host, WPEngine, is killing the SQL query because… well… see for yourself:
[06-Feb-2024 22:08:46 UTC] KILLED QUERY (91948 characters long generated in /nas/content/live/storenamehere/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:576): SELECT order_item_type, order_item_id, order_id, order_item_name FROM oqz_woocommerce_order_items WHERE order_id in ( 168530,168516,168515,168354,168514,168513,168512,168511,168510,168509,168508,168352,168505,168503,168502,168351,
I’ve truncated that list, because…. it’s literally thousands, if not every single order in the store.
The end result is that the order submission page hangs for about 30 seconds, then errors out, creating an order in the system in Pending Payment status.
I don’t seem to be able to get a stack trace on that error to determine exactly which code is the problem, but as soon as I disabled the Order Attribution feature, we were back in business.
It would appear that the new feature wasn’t tested on stores with large volume. Why creating a new order caused the site to look up all orders by ID is beyond me, but that’s what it’s doing.
Thanks!
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس