Post by itSourceRo » Sun Mar 29, 2020 12:03 am

Hello!

I have an opencart 3 shop with Journal theme 3 , it has almost an year.

From time to time we have an issue inside admin, receiving an internal 500 error when changing order status AND checking Notify the client option.
If we don't check that option everything works fine, the order status is changing fast, when we click that it freezes and stay so for 1 minute or so and at the end we get Internal Server error 500. We are using Colored Order Status in Back Office to process orders.

These are the errors received in main error_log

Code: Select all

#0 /home/annd/storage/modification/system/library/db.php(58): DB\MySQLi->query('SELECT * FROM o...')
#1 /home/annd/public_html/catalog/model/design/theme.php(4): DB->query('SELECT * FROM o...')
#2 /home/annd/storage/modification/system/engine/loader.php(259): ModelDesignTheme->getTheme('mail/order_add', 'journal3')
#3 /home/annd/public_html/system/engine/proxy.php(47): Loader->{closure}(Array, Array)
#4 /home/annd/storage/modification/catalog/controller/event/theme.php(48): Proxy->__call('getTheme', Array)
#5 /home/annd/storage/modification/system/engine/action.php(79): ControllerEventTheme->override('mail/order_add', Array, '')
#6 /home/annd/storage/modification/system/engine/event.php(67): Action->execute(Object(Registry), Array)
#7 /home/annd/storage/modification/s in /home/annd/public_html/system/library/db/mysqli.php on line 40
[28-Mar-2020 15:32:06 UTC] PHP Fatal error:  Uncaught Exception: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM oc_theme WHERE store_id = '0' AND theme = 'journal3' AND route = 'mail/order_add' in /home/annd/public_html/system/library/db/mysqli.php:40
Stack trace:
#0 /home/annd/storage/modification/system/library/db.php(58): DB\MySQLi->query('SELECT * FROM o...')
#1 /home/annd/public_html/catalog/model/design/theme.php(4): DB->query('SELECT * FROM o...')
#2 /home/annd/storage/modification/system/engine/loader.php(259): ModelDesignTheme->getTheme('mail/order_add', 'journal3')
#3 /home/annd/public_html/system/engine/proxy.php(47): Loader->{closure}(Array, Array)
#4 /home/annd/storage/modification/catalog/controller/event/theme.php(48): Proxy->__call('getTheme', Array)
#5 /home/annd/storage/modification/system/engine/action.php(79): ControllerEventTheme->override('mail/order_add', Array, '')
#6 /home/annd/storage/modification/system/engine/event.php(67): Action->execute(Object(Registry), Array)
#7 /home/annd/storage/modification/s in /home/annd/public_html/system/library/db/mysqli.php on line 40
[28-Mar-2020 15:36:02 UTC] PHP Fatal error:  Uncaught Exception: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM oc_seo_url WHERE `query` = 'account/login' AND store_id = '0' AND language_id = '2' in /home/annd/public_html/system/library/db/mysqli.php:40
Stack trace:
#0 /home/annd/storage/modification/system/library/db.php(58): DB\MySQLi->query('SELECT * FROM o...')
#1 /home/annd/storage/modification/catalog/controller/startup/seo_url.php(140): DB->query('SELECT * FROM o...')
#2 /home/annd/public_html/system/library/url.php(64): ControllerStartupSeoUrl->rewrite('https://www.ann...')
#3 /home/annd/public_html/catalog/controller/account/forgotten.php(21): Url->link('account/login', '', true)
#4 /home/annd/storage/modification/system/engine/action.php(79): ControllerAccountForgotten->index()
#5 /home/annd/public_html/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))
#6 /home/annd/storage/modification/system/engine/action.php(79): ControllerStartupRouter->index()
#7 /home/annd/storage/modification/system/e in /home/annd/public_html/system/library/db/mysqli.php on line 40
There is no error in the admin error_log

I contacted hosting and they say everything is fine and we have something not working well. Again, the errors occurs from time to time, it works well for a month or so and suddenly it doesn't work anymore.

Can anyone help me with and advice?
Thank you!
Last edited by straightlight on Sun Mar 29, 2020 1:49 am, edited 1 time in total.

Newbie

Posts

Joined
Mon May 13, 2019 8:03 pm

Post by opencartmart » Sun Mar 29, 2020 12:09 am

You have truncated the error message. Please provide the full error message.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by itSourceRo » Sun Mar 29, 2020 12:13 am

Hi!, and thanks for your answer

Here is a screenshot of what we are seeing in admin and the error log

Attachments

1.jpg

1.jpg (35.23 KiB) Viewed 7756 times


Newbie

Posts

Joined
Mon May 13, 2019 8:03 pm

Post by opencartmart » Sun Mar 29, 2020 12:23 am

The error is the following one. It could happen due to several reasons. Contact your host provider and give them the following message.

Code: Select all

 Error: MySQL server has gone away

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by itSourceRo » Sun Mar 29, 2020 12:28 am

I contacted them and they say it is not their fault, they say the MySQL server is ok. The error only happen when I check the Notify customer option, if I don't check that everything works fine. therefore it is something related to MySQL server because when that is checked it sends an email to the customer

Newbie

Posts

Joined
Mon May 13, 2019 8:03 pm

Post by opencartmart » Sun Mar 29, 2020 12:44 am

itSourceRo wrote:
Sun Mar 29, 2020 12:28 am
I contacted them and they say it is not their fault, they say the MySQL server is ok. The error only happen when I check the Notify customer option, if I don't check that everything works fine. therefore it is something related to MySQL server because when that is checked it sends an email to the customer
How could they say that? This error usually happens when MySQL gets timed out or when you run a big query, as a result, it exceeds `max_allowed_packet `.
You can not change those parameters unless you have root access. If you have root access, you can try increasing the value of parameters `max_allowed_packet ` and `wait_timeout ` into my.cnf

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by letxobnav » Sun Mar 29, 2020 9:48 am

[28-Mar-2020 12:47:36 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 12:58:04 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 13:11:54 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Error: MySQL server has gone away
[28-Mar-2020 13:13:17 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Error: MySQL server has gone away
LOST/CLOSED DB CONNECTION

[28-Mar-2020 13:17:48 UTC] PHP Fatal error: Uncaught Exception: Error: EHLO not accepted from server!
[28-Mar-2020 13:18:07 UTC] PHP Fatal error: Uncaught Exception: Error: EHLO not accepted from server!
[28-Mar-2020 13:19:21 UTC] PHP Fatal error: Uncaught Exception: Error: EHLO not accepted from server!
[28-Mar-2020 13:19:47 UTC] PHP Fatal error: Uncaught Exception: Error: EHLO not accepted from server!
WRONG MAIL SETTINGS

[28-Mar-2020 13:58:36 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 13:59:20 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 14:00:26 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 14:01:13 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 15:14:15 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 15:15:18 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
[28-Mar-2020 15:15:37 UTC] PHP Fatal error: Uncaught Exception: Error: MySQL server has gone away
ETC...
LOST/CLOSED DB CONNECTION

Wonder what modifications you have that require changes to the db class.
/home/annd/storage/modification/system/library/db.php

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 paulfeakins » Mon Mar 30, 2020 7:10 pm

opencartmart wrote:
Sun Mar 29, 2020 12:44 am
How could they say that?
Most web hosts deny the problem until you prove it's them very clearly.

If this happens every single time you click "notify" then it's probably code.

If it only happens sometimes when the server is running a bit slow then it's caused by your server not being powerful enough and you should upgrade.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by opencartmart » Mon Mar 30, 2020 10:46 pm

paulfeakins wrote:
Mon Mar 30, 2020 7:10 pm
Most web hosts deny the problem until you prove it's them very clearly.
It was indeed a server issue. The hosting provider has admitted it as their problem. OP told me in a private message.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am
Who is online

Users browsing this forum: Google [Bot] and 1 guest