Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: General error: 2006 MySQL server has gone away  (Read 4845 times)

Offline aiswarjya

  • Newbie
  • *
  • Posts: 39
  • Karma: +6/-0
    • View Profile
General error: 2006 MySQL server has gone away
« on: May 03, 2016, 12:53:40 AM »
How to fix it

2016-05-03 4:37:34 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: General error: 2006 MySQL server has gone away
« Reply #1 on: May 03, 2016, 10:16:34 AM »
This indicates that connection to your Mysql server closed in the middle of execution.
This can be one time issue as Mysql server was restarted or lost connection. If this persists, check your Mysql server.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline aiswarjya

  • Newbie
  • *
  • Posts: 39
  • Karma: +6/-0
    • View Profile
Re: General error: 2006 MySQL server has gone away
« Reply #2 on: May 05, 2016, 02:13:56 PM »
This type of error are always come & site is slow

i found this error

Quote
2016-05-05 7:21:13 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 7:21:13 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 8:50:03 - Error: EHLO not accepted from server!
2016-05-05 8:50:03 - Error: AUTH LOGIN not accepted from server!
2016-05-05 8:50:03 - Error: Username not accepted from server!
2016-05-05 8:50:03 - Error: Password not accepted from server!
2016-05-05 8:50:03 - Error: MAIL FROM not accepted from server!
2016-05-05 8:50:03 - Error: RCPT TO not accepted from server!
2016-05-05 8:50:03 - Error: DATA not accepted from server!
2016-05-05 8:50:03 - Error: QUIT not accepted from server!
2016-05-05 11:39:58 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 17:54:56 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 17:55:19 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 17:55:19 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-05 17:55:20 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: General error: 2006 MySQL server has gone away
« Reply #3 on: May 06, 2016, 02:10:07 AM »
Hello
Try to change timeout in your php.ini or better to ask help hosting support
Code: [Select]
ini_set('mysql.connect_timeout', 300);
ini_set('default_socket_timeout', 300);

Offline aiswarjya

  • Newbie
  • *
  • Posts: 39
  • Karma: +6/-0
    • View Profile
Re: General error: 2006 MySQL server has gone away
« Reply #4 on: May 07, 2016, 03:25:05 AM »
i put this on php.ini file
Quote
ini_set('mysql.connect_timeout', 30000);
ini_set('default_socket_timeout', 30000);

Now i get this error

Quote
2016-05-07 6:58:44 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 6:59:01 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:00:16 - App Error: AbanteCart core v.1.2.6 0 in /home/site/public_html/site.com/core/database/apdomysql.php on line 75
2016-05-07 7:00:16 - database error: AbanteCart core v.1.2.6 Error: SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query
Error No: HY000
SELECT DISTINCT p.manufacturer_id, m.name
FROM ac_products p
LEFT JOIN ac_manufacturers m ON p.manufacturer_id = m.manufacturer_id
WHERE p.product_id IN (SELECT DISTINCT p2c.product_id
FROM ac_products_to_categories p2c
INNER JOIN ac_products p ON p.product_id = p2c.product_id
WHERE p.status = '1' AND p2c.category_id IN (65, 386, 456)); in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>78</b>
2016-05-07 7:00:17 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:00:17 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:00:17 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:03:34 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:03:34 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:03:34 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>
2016-05-07 7:03:34 - warning: AbanteCart core v.1.2.6 unlink(/home/site/public_html/site.com/system/cache/product/product.rating.1993.1462604481): No such file or directory in <b>/home/site/public_html/site.com/core/lib/cache.php</b> on line <b>332</b>
2016-05-07 7:03:34 - warning: AbanteCart core v.1.2.6 unlink(/home/site/public_html/site.com/system/cache/product/product.rating.1993.1462604481): No such file or directory in <b>/home/site/public_html/site.com/core/lib/cache.php</b> on line <b>332</b>
2016-05-07 7:04:11 - : AbanteCart core v.1.2.6 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in <b>/home/site/public_html/site.com/core/database/apdomysql.php</b> on line <b>52</b>

I check this one manually its work fine

Quote
SELECT DISTINCT p.manufacturer_id, m.name
FROM ac_products p
LEFT JOIN ac_manufacturers m ON p.manufacturer_id = m.manufacturer_id
WHERE p.product_id IN (SELECT DISTINCT p2c.product_id
FROM ac_products_to_categories p2c
INNER JOIN ac_products p ON p.product_id = p2c.product_id
WHERE p.status = '1' AND p2c.category_id IN (65, 386, 456));


If i open more then 10 pages another pages show "site is not working".

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: General error: 2006 MySQL server has gone away
« Reply #5 on: May 09, 2016, 02:03:48 AM »
Please remove this lines if they not help you.

It is still looks like something wrong with your Mysql server . I suggest you to ask your hosting provider to help you find issue
or you can play with your mysql connection settings http://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away

 

Powered by SMFPacks Social Login Mod