Guest DeFiAnCe Posted January 14, 2008 Share Posted January 14, 2008 Hi All, Im a engineer @ a hosting provider, One of our customers is running a cubecart for a while now, since Saturday the cart keeps crashing the Mysql Server. Meaning it will push the mysql usage to 99% and it will stay there, it will not serve any data anymore. The query crashing the server is the same over and over again , is there anyone here that can shed a light on this problem ? The problem query : QUERY = SELECT DISTINCT a.productId, a.productCode, a.name, a.description, a.image, a.price, a.sale_price, b.cat_name FROM cc_CubeCart_inventory a, cc_CubeCart_category b, cc_CubeCart_order_inv c WHERE a.cat_id = b.cat_id AND a.productId = c.productId AND c.cart_order_id IN (SELECT cart_order_id FROM cc_CubeCart_order_sum WHERE customer_id IN (SELECT customer_id FROM cc_CubeCart_order_sum WHERE cart_order_id IN (SELECT a.cart_order_id FROM cc_CubeCart_order_inv a, cc_CubeCart_order_sum b WHERE a.cart_order_id = b.cart_order_id AND (b.status = 2 OR b.status = 3) AND a.productId = '38')) AND (status = 2 OR status = 3)) I tried changing the DB to InnoDB , but this had no effect at al, i must point out that the client has alot of articles in the shop . Any help is apreciated Server Info : PHP Version: 5.2.3 MySQL Version : 4.1.12-standard-log Server Software : Apache/1.3.37 (Unix) PHP/5.2.3 mod_ssl/2.8.28 OpenSSL/0.9.8a mod_perl/5.0.2.2510 Quote Link to comment Share on other sites More sharing options...
Guest DeFiAnCe Posted January 14, 2008 Share Posted January 14, 2008 ah cmon, what is going on here ? 40 views and not a single replie ?? is this the community wich needs to support the cube shop ? if so im really disapointed :) Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 14, 2008 Share Posted January 14, 2008 I am by no means a SQL expert, but from the statements I've tried to grok (and my own SQL experiments gone horribly wrong), but is this an actual statement in the stock CC code? If so, what file can it be found in? If not a SQL statement actually found in the stock CC code, I'm inclined to suggest that you or your customer study up on the JOIN keyword. It may be a preferable solution to the convoluted (and possibly train-wrecked?) SQL statement included. Can you plug this statement in a SQL admin panel, like PHPMyAdmin and see if you get the same results. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2008 Share Posted January 15, 2008 yeah I also don't recognize this code snippet. Which file is it in and could it be modified code? I would try uploading an original version of the page and see if you have the same problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.