Jump to content

Cubecart V3 : Hanging Mysql Database ! ?


Guest DeFiAnCe

Recommended Posts

Guest DeFiAnCe

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

Link to comment
Share on other sites

Guest DeFiAnCe

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...