Upgrade Wizard failing System Check due to Warning: Error while sending QUERY packet. PID=1468150

Hi,

I am having a warning error showing up when using the upgrade wizard.

It wont complete step one and says this:
Warning: Error while sending QUERY packet. PID=1468150

The logs end up saying Database failure at the end.
Query Failed: CREATE TABLE temp (id varchar(36)): MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: INSERT INTO temp (id) VALUES (‘abcdef0123456789abcdef0123456789abcd’): MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: UPDATE temp SET id = ‘100000000000000000000000000000000000’ WHERE id = ‘abcdef0123456789abcdef0123456789abcd’: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: SELECT id FROM temp WHERE id=‘100000000000000000000000000000000000’ LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Get One Failed:SELECT id FROM temp WHERE id=‘100000000000000000000000000000000000’: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: DELETE FROM temp WHERE id = ‘100000000000000000000000000000000000’: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: ALTER TABLE temp add COLUMN test varchar(50) NULL : MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: ALTER TABLE temp modify COLUMN test varchar(100) NULL : MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: ALTER TABLE temp drop COLUMN test: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: DROP TABLE IF EXISTS temp: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: SELECT version() version LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Get One Failed:SELECT version() version: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Query Failed: SELECT id FROM upgrade_history ORDER BY date_entered desc: MySQL error 2006: MySQL server has gone away
Wed May 30 18:33:18 2018 [3402730][c9cef27b-4142-933a-ec19-582f4d5be162][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.

Looking for any help possible on this.
Many Thanks!

MYSQL has gone away are serious errors, there’s no way an upgrade will work with that sort of database crash.

In the worst cases, they are caused by database corruption or failing disks.

But we can start by investigating not-so-serious causes. Check if you php.ini is giving generous values for some settings.

I suggest

memory_limit —> 512MB if your hosting allows, or if you’re self-hosting

upload_max_size —> I normally just make this big enough for the upgrade packages, currently around 20MB

max_execution_time —> 60 seconds is better, also because of the upgrades, and occasioally I’ve had to make it even more for some specific long-running operation

You might also want to run the first query from this post, from phpMyAdmin, to check your database for overgrown tables:

https://pgorod.github.io/Database-tables-size/

Hi PGR,

Thank you for your reply.

I tried your below suggestions and no problems were resolved from it.

I ran the query and it said 78 errors were found during analysis. Not sure if thats errors from the query or errors in our database.

I fear you might really have a damaged database. I never heard of that query giving errors…

Can you post a screenshot of that error, so I can see how it looks?

Put it here
https://pasteboard.co

Hi,

Here is the URL: https://pasteboard.co/HnViaJL.png

I think that’s just phpMyAdmin telling you it doesn’t understand your query.

Maybe it’s the way you’re copy-pasting it, something is breaking?