Post by awuk » Thu Sep 05, 2019 12:30 am

Hi Can any one help

since yesterday we are getting this error

Any one got any ideas on how to fix?

Code: Select all

Warning: mysqli::query(): MySQL server has gone away in /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db/mysqli.php on line 18Warning: mysqli::query(): Error reading result set's header in /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db/mysqli.php on line 18
Fatal error: Uncaught Exception: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT COUNT(DISTINCT p.product_id) AS total FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '1' AND p.price LIKE '%' in /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db/mysqli.php:40 Stack trace: #0 /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db.php(45): DB\MySQLi->query('SELECT COUNT(DI...') #1 /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/storage2atmy98p64me/modification/admin/model/catalog/product.php(1332): DB->query('SELECT COUNT(DI...') #2 /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/storage2atmy98p64me/modification/system/engine/loader.php(248): ModelCatalogProduct->getTotalProducts(Array) #3 /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/engine/proxy.php(47): Loader->{closure}(Array, Array) #4 /home/airsoftwcom/domains/airsoftwholesale in /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db/mysqli.php on line 40

Fatal error: Uncaught Exception: Error: MySQL server has gone away<br />Error No: 2006<br />REPLACE INTO `oc_session` SET session_id = 'd3443c4b8647582c93d3ff10c7', `data` = '{\"language\":\"en-gb\",\"currency\":\"GBP\",\"install\":\"V94sI3RJXf\",\"filter_date_start\":\"\",\"filter_date_end\":\"\",\"filter_range\":\"current_year\",\"filter_report\":\"sales_summary\",\"filter_details\":\"no_details\",\"filter_group\":\"month\",\"filter_sort\":\"report_type\",\"filter_order\":\"desc\",\"filter_limit\":25,\"filter_status_date_start\":\"\",\"filter_status_date_end\":\"\",\"filter_order_status_id\":\"\",\"filter_order_id_from\":\"\",\"filter_order_id_to\":\"\",\"filter_order_value_min\":\"\",\"filter_order_value_max\":\"\",\"filter_store_id\":\"\",\"filter_currency\":\"\",\"filter_taxes\":\"\",\"filter_tax_classes\":\"\",\"filter_geo_zones\":\"\",\"filter_customer_group_id\":\"\",\"filter_customer_name\":\"\",\"filter_customer_email\":\"\",\"filter_customer_telephone\":\"\",\"filter_ip\":\"\",\"filter_payment_company\":\"\",\" in /home/airsoftwcom/domains/airsoftwholesaleuk.com/public_html/system/library/db/mysqli.php on line 40
Last edited by straightlight on Tue May 12, 2020 8:47 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Fri Apr 12, 2019 12:17 am

Post by dparakhiya » Fri Sep 06, 2019 6:06 pm

contact your hosting provider in order to resolve this issue.

For quick, professional OpenCart support
Online
contact me on skype : dparakhiya_1
email : dipneshp@gmail.com


User avatar
New member

Posts

Joined
Fri Jul 28, 2017 1:13 pm
Location - India

Post by thekrotek » Fri Sep 06, 2019 6:57 pm

The error says for itself: "MySQL server has gone away".

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by letxobnav » Fri Sep 06, 2019 9:01 pm

It means that the established connection to the database has timed out.

Could be that you are using persistent connections which also time out and then give that warning if they are not explicitly closed.
Could be that your script takes to long between queries and the connection is dropped in between.
Could also be a memory allocation problem.

To prevent it in any case would be to close the connection after every database access but that would add overhead delay.
Another option is to check if the link is still up before db access and if not reconnect, that would eliminate the warning as well.

Timeouts are set via variables:

connect_timeout
wait_timeout
interactive_timeout

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by kekey » Tue May 12, 2020 8:42 am

tolong pencerahanya ini kenapa ya, saya install theme topdeal gk bisa2 selalu error saat proses upload

Code: Select all

PHP Warning: mysqli::query(): MySQL server has gone away in /home/u858002734/domains/pegibelanja.com/public_html/system/library/db/mysqli.php on line 18
PHP Warning: mysqli::query(): Error reading result set's header in /home/u858002734/domains/pegibelanja.com/public_html/system/library/db/mysqli.php on line 18

Newbie

Posts

Joined
Mon May 11, 2020 8:51 pm

Post by straightlight » Tue May 12, 2020 8:46 am

kekey wrote:
Tue May 12, 2020 8:42 am
tolong pencerahanya ini kenapa ya, saya install theme topdeal gk bisa2 selalu error saat proses upload

Code: Select all

PHP Warning: mysqli::query(): MySQL server has gone away in /home/u858002734/domains/pegibelanja.com/public_html/system/library/db/mysqli.php on line 18
PHP Warning: mysqli::query(): Error reading result set's header in /home/u858002734/domains/pegibelanja.com/public_html/system/library/db/mysqli.php on line 18
This is an English forum. Contact your host regarding this specific SQL issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by foobarac » Mon Jun 01, 2020 9:21 am

Guys, it's not always the Host servers fault in this case.

The DB transaction is inflight so if you have modules/processes that do other things during the process i.e send emails out to confirm an order or confirm the opening of an account, and this hangs - then you are going to get the "PHP Warning: mysqli::query(): MySQL server has gone away" in your error logs.

However the problem could be that your SMTP server is hanging (which was my problem).

New member

Posts

Joined
Fri Sep 21, 2018 9:46 pm
Who is online

Users browsing this forum: No registered users and 75 guests