MySQL server has gone away

Hi there,

I’m currently unable to run the upgrade wizard, when I try I get a 500 internal server error from just clicking on the upgrade wizard link in the admin area, it doesn’t even get onto the first step pages. Other things seem to work okay and I don’t get any obvious errors from doing anything else on the system.

Here’s what happens in suitecrm.log

Mon Sep 16 14:39:26 2019 [3611565][-none-][FATAL] Mysqli_query failed.
Mon Sep 16 14:39:26 2019 [3611565][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Mon Sep 16 14:39:26 2019 [3615542][-none-][FATAL] Mysqli_query failed.
Mon Sep 16 14:39:26 2019 [3615542][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Mon Sep 16 14:39:26 2019 [3618748][-none-][FATAL] Mysqli_query failed.

I’ve tried increasing PHP memory_limit, max_execution_time, max_input_time via a php.ini, are there any other settings I can try to increase? I’m hosting this on a webhost running PHP 7.2, and my current suite version is 7.11.3

I had a look at the database following https://pgorod.github.io/Database-tables-size/ and the job queue table was quite large so I cleared that out but there’s nothing else that looked particularly over sized.

Does anyone have any ideas or is there something else I can look at?

Ouch. “MySQL server has gone away” is your database process crashing. There are many possible causes for that

https://dev.mysql.com/doc/refman/8.0/en/gone-away.html

ranging from MySQL bugs to database corruption, to many other things.

I don’t think the actual query (SELECT users.* FROM users WHERE users.id = ‘1’ AND users.deleted=0 LIMIT 0,1) is responsible. It’s pretty simple. You don’t have a huge “users” table, do you?

See if you can restore that table from backup, or somehow repair it from phpmyAdmin…

We are trying to set up our Outgoing Email module from our Office 365 Outlook account for each of our team members, we cant get the outgoing emails to show in the email module.
We get the following errors:
Tue Nov 17 09:08:12 2020 [914][2][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Tue Nov 17 09:08:12 2020 [907][-none-][FATAL] Mysqli_query failed.
Tue Nov 17 09:08:12 2020 [907][-none-][FATAL] Retrieving record by id users:2 found Query Failed: SELECT users.* FROM users WHERE users.id = ‘2’ AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away

we can get it working on a non Azure Office 365 account, is the issue with Outlook on Azure servers.
Please help

The test emails will send and are received, but there is no record of the email in the email module sent items. there is no record of the email sent in our Outlook account either.