Guest Landrollerinc Posted December 21, 2010 Share Posted December 21, 2010 On the final screen of our webstore, the CC info is submitted. Instead of going to an accepted screen, there is no progress on the status bar, and eventually the page goes to an error page: MySQL Error Occurred Error Message: 2006: MySQL server has gone away SQL: SELECT max(`id`), `status` FROM cc4_CubeCart_transactions WHERE `trans_id` = '3358932963' GROUP BY `id` DESC Can anyone help? Quote Link to comment Share on other sites More sharing options...
vokf Posted December 22, 2010 Share Posted December 22, 2010 If possible, please provide a URL. Note: Anyone testing should make it clear its a test purchase. It would also be useful to know which payment module you're using. If the payment module is not provided by CubeCart (ie, a 3rd party module), then you should contact the author direct for support (if possible). Thanks, Jason Quote Link to comment Share on other sites More sharing options...
Robsta Posted December 22, 2010 Share Posted December 22, 2010 Looks like the transactions table might be corrupt. Do a repair on the tables within CC Admin. Alternatively, contact your hosting as there may be a mySQL issue. Quote Link to comment Share on other sites More sharing options...
Guest Landrollerinc Posted December 22, 2010 Share Posted December 22, 2010 Looks like the transactions table might be corrupt. Do a repair on the tables within CC Admin. Alternatively, contact your hosting as there may be a mySQL issue. Did a repair to the tables a few days ago with no effect. Our host stated that since the MySQL error points to Cubecart, it is outside their support. We do not use a third party payment module. www.landroller.com/store Quote Link to comment Share on other sites More sharing options...
vokf Posted December 22, 2010 Share Posted December 22, 2010 [ Did a repair to the tables a few days ago with no effect. Our host stated that since the MySQL error points to Cubecart, it is outside their support. We do not use a third party payment module. www.landroller.com/store What payment module are you using? I've just run a test purchase (name: jason clark), and used a test credit card number, this was declined and so points to an automated system validating the payment (I think the built-in CC4 manual credit card system just does basic validatation that would pass). Jason Quote Link to comment Share on other sites More sharing options...
Guest Landrollerinc Posted December 22, 2010 Share Posted December 22, 2010 [ Did a repair to the tables a few days ago with no effect. Our host stated that since the MySQL error points to Cubecart, it is outside their support. We do not use a third party payment module. www.landroller.com/store What payment module are you using? I've just run a test purchase (name: jason clark), and used a test credit card number, this was declined and so points to an automated system validating the payment (I think the built-in CC4 manual credit card system just does basic validatation that would pass). Jason Jason, Thank you so much for looking into this. As far as I know, we are not using anything 3rd party for payments. When I checked the 3rd Party link in CC, it points to Google Analytics and an Stock Levels for Product Opts. Will Quote Link to comment Share on other sites More sharing options...
Guest actsofgood Posted January 28, 2011 Share Posted January 28, 2011 Hi, A store we've been running for a few years now (strand tea . com) just started having this exact same problem. I was relieved to find this post, but there doesn't seem to be an immediate solution. Is there any insight into the cause of this problem? This problem for us started a couple of days ago, seemingly out of the blue. We talked to our host, who couldn't find out exactly what was happening. They mentioned that the mysql process was just sleeping for 2 minutes before it times out. Also, I tried repairing the tables as mentioned prior, to no avail. What happens is, a customer places an order, and after hitting "Complete Payment" the order is processed, the card is charged, the email confirmation is sent to the customer, but the response in the browser hangs for a long time until the user sees the error message below. The orders are completing correctly, but the system doesn't seem to be making it to the step where the transactions are being logged. Since the page is taking so long to time out, a handful of customers have been clicking "Complete Payment Multiple times and getting charged. I would too if it was taking that long and I didn't know better. Here's some more info: MySQL Error Occured Error Message: 2006: MySQL server has gone away SQL: SELECT max(`id`), `status` FROM CubeCart_transactions WHERE `trans_id` = '3426147518' GROUP BY `id` DESC ---- We're using the Authorize.net gateway PHP Version 5.2.13 MySQL 5.0.86 Any insight would be appreciated. Thank You! Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted January 29, 2011 Share Posted January 29, 2011 Hi There are a number of cause of this eroor message being produced - all of which a hosting company should know or be able to find out and fix !! The most common are : 1) The server that your site is hosted on is overloaded especially from a MySQM memory allocation point of view. CubeCart along with many cart solutions is pretty heavy of mySQL memory usage and most hosting companies dont tune their servers specifically for MySQL applications, have too little memory in their servers and often try to put too many websites on the same server ! 2) The server timed out and closed the connection to MySQL - if this is the cause then tuning mySQL can solve the problem 3) The server dropped an incorrect or too large a packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. There are other causes but the first 2 are the most common and any hosting company should certainly know how to diagnose and fix any of the above Ian Hi, A store we've been running for a few years now (strand tea . com) just started having this exact same problem. I was relieved to find this post, but there doesn't seem to be an immediate solution. Is there any insight into the cause of this problem? This problem for us started a couple of days ago, seemingly out of the blue. We talked to our host, who couldn't find out exactly what was happening. They mentioned that the mysql process was just sleeping for 2 minutes before it times out. Also, I tried repairing the tables as mentioned prior, to no avail. What happens is, a customer places an order, and after hitting "Complete Payment" the order is processed, the card is charged, the email confirmation is sent to the customer, but the response in the browser hangs for a long time until the user sees the error message below. The orders are completing correctly, but the system doesn't seem to be making it to the step where the transactions are being logged. Since the page is taking so long to time out, a handful of customers have been clicking "Complete Payment Multiple times and getting charged. I would too if it was taking that long and I didn't know better. Here's some more info: MySQL Error Occured Error Message: 2006: MySQL server has gone away SQL: SELECT max(`id`), `status` FROM CubeCart_transactions WHERE `trans_id` = '3426147518' GROUP BY `id` DESC ---- We're using the Authorize.net gateway PHP Version 5.2.13 MySQL 5.0.86 Any insight would be appreciated. Thank You! Quote Link to comment Share on other sites More sharing options...
Guest jackman13 Posted May 9, 2011 Share Posted May 9, 2011 hi landrollerinc. wat type of payment module r u using? Quote Link to comment Share on other sites More sharing options...
Guest Roger Huston Posted May 11, 2011 Share Posted May 11, 2011 Hello, What if you try running that statement from phpmyadmin, does it work? This is a select statement after the value has been put into database. Can you verify that the transaction was input correctly and that the value it is looking for is actually in the database. The SQL statement is in /classes/cart/order.php in the storeTrans function. This function is called in every gateway. It looks like it is a check to determine if the transaction has already been stored. Here is the entire function function storeTrans($transData, $forceLog = true) { global $glob, $db; $transDataSQL['time'] = $db->MySQLSafe(time()); $transDataSQL['customer_id'] = $db->MySQLSafe($transData['customer_id']); $transDataSQL['gateway'] = $db->MySQLSafe($transData['gateway']); $transDataSQL['extra'] = $db->MySQLSafe($transData['extra']); $transDataSQL['trans_id'] = $db->MySQLSafe($transData['trans_id']); $transDataSQL['order_id'] = $db->MySQLSafe($transData['order_id']); $transDataSQL['status'] = $db->MySQLSafe($transData['status']); $transDataSQL['amount'] = $db->MySQLSafe($transData['amount']); $transDataSQL['notes'] = $db->MySQLSafe($transData['notes']); // make sure status isn't repeated on last call $maxStatus = $db->select('SELECT max(`id`), `status` FROM '.$glob['dbprefix'].'CubeCart_transactions WHERE `trans_id` = '.$transDataSQL['trans_id'].' GROUP BY `id` DESC'); if (!$forceLog && ($maxStatus[0]['status'] != $transData['status'] || !$maxStatus)) { $db->insert($glob['dbprefix'].'CubeCart_transactions', $transDataSQL); } else if ($forceLog) { $db->insert($glob['dbprefix'].'CubeCart_transactions', $transDataSQL); } } Now, what is curious is that the db->insert statements are exactly the same. This means that unless $forceLog = FALSE, then this will always trigger. This makes the value of $maxStatus irrelevant and thus the SELECT statement irrelevant. It will always insert into the database and the only gateway that sends a FALSE value is Google Checkout. Does anyone else see anything different? As long as you are not using Google checkout I would think the function could be written as such. function storeTrans($transData, $forceLog = true) { global $glob, $db; $transDataSQL['time'] = $db->MySQLSafe(time()); $transDataSQL['customer_id'] = $db->MySQLSafe($transData['customer_id']); $transDataSQL['gateway'] = $db->MySQLSafe($transData['gateway']); $transDataSQL['extra'] = $db->MySQLSafe($transData['extra']); $transDataSQL['trans_id'] = $db->MySQLSafe($transData['trans_id']); $transDataSQL['order_id'] = $db->MySQLSafe($transData['order_id']); $transDataSQL['status'] = $db->MySQLSafe($transData['status']); $transDataSQL['amount'] = $db->MySQLSafe($transData['amount']); $transDataSQL['notes'] = $db->MySQLSafe($transData['notes']); if ($forceLog) { $db->insert($glob['dbprefix'].'CubeCart_transactions', $transDataSQL); } } Does anyone else agree? However, if the Database is being overloaded, this will not fix the problem. It may just transfer it to another call. However, this may work for some with this problem. Just be sure to check the database on a sample order to verify everything was written correctly. - Roger 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.