From 7.0.1 to 7.0.2 Upgrade fails at System check

Hi,

I tried to upgrade suiteCRM 7.0.1 through the Wizard, but at the system check it jumps to a blank screen and returns following message “Database failure. Please refer to sugarcrm.log for details.”

Error Log reads:
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: CREATE TABLE temp (id varchar(36)): MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: INSERT INTO temp (id) VALUES (‘abcdef0123456789abcdef0123456789abcd’): MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: UPDATE temp SET id = ‘100000000000000000000000000000000000’ WHERE id = ‘abcdef0123456789abcdef0123456789abcd’: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: SELECT id FROM temp WHERE id=‘100000000000000000000000000000000000’ LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Get One Failed:SELECT id FROM temp WHERE id=‘100000000000000000000000000000000000’: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: DELETE FROM temp WHERE id = ‘100000000000000000000000000000000000’: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: ALTER TABLE temp add COLUMN test varchar(50) NULL : MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: ALTER TABLE temp modify COLUMN test varchar(100) NULL : MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: ALTER TABLE temp drop COLUMN test: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: DROP TABLE IF EXISTS temp: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Checking privileges: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: SELECT version() version LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Get One Failed:SELECT version() version: MySQL error 2006: MySQL server has gone away
Fri Jan 24 10:15:34 2014 [14327][92e8dd98-040f-9040-2602-52d7de221176][FATAL] Query Failed: SELECT id FROM upgrade_history ORDER BY date_entered desc: MySQL error 2006: MySQL server has gone away

Why is this, any clue?

Hi DPOST,

Is your MySQL server live? Do you have the correct settings pointing to your db in your config.php?

Thanks,

Will.

Hi Will,

yes I assume so as the CRM is running since a few weeks without any issues. Datas are being saved normally etc. So what else could be the reason?

Your MySQL may have crashed and need restarting… If this is on the XAMPP install check in XAMPP control panel to see if it is running if not restart it.

Hmm odd, I mean how could it have crashed if people are still able to write data to the database? I have contacted my host to have a look at it. I will update once I know more …

So I contacted Serveradmins and they replied following :

This error MySQL server has gone away means your website or scripts part of it execute mysql query that take too long and mysql times out. More information regarding it can be found in the guide below:

http://kb.siteground.com/i_get_mysql_server_has_gone_away_error_in_my_application/

The action that may help are as follows:

  1. Repair and optimize the database
  2. Revert the changes you performed recently. Mostly such problem occurs after installation of a new extension or feature.

Given the circumstances I would advise you to restore your website following the instructions in the guide below or just post a new ticket under Backup Restore category and we will restore the website for you:

http://www.siteground.com/tutorials/cpanel/backup_restore.htm

Best Regards,
Leonid G.
SiteGround Support Team

They also suggested to change DB engine from MyISAM to InnoDB - does it make any sense?

So I tried repairing and optimizing the Database, restarted MySQL and changed tables to InnoDB Engine - but still no luck.
Getting crazy - ahh ! Any more suggestions from anyone, what could solve the issue? I need this update as the Report module is otherwise useless :confused:

You should check the PHP configuration value max_execution_time (600 is good).
Then the MySQL configuration values connect_timeout (10 is good) and wait_timeout (200 is good).

1 Like

That sounds like a good idea - problem is that my hosting provider Siteground doesn’t want to change the values…

Is there a workaround?

Reply from Siteground:
Please note that your account is hosted on shared hosting servers. Our system administrators have chosen the best server configuration among many others that were tested. This is why I am afraid that the specified timeout limits can not be changed per customers request.

I have an idea but what is your skill level with SQL files/config files and so on?

The idea is to do a backup of your current database and files and do a fresh install of 7.0.2. Run install and then modify config.php/config_override.php and import your backed up database.

its tricky and I suggest practicing on a test install first.

1 Like

My skills are rather poor - I managed to get the system running through loads of tutorials I’ve found online - am not at all a developer or such. But I tend to learn quickly.

I could try installing 7.0.2 and migrating the data somehow, but the thing is, I have loads of customizations which I wouldn’t know how to reproduce safely. I’ll have to have a thought on it - seems like it might be above my current powers.

If you can do a test install here is what I would do to “LEARN”
Backup your Database and Files.

Keep track of the following:
*Database backup
*config.php
*config_overrides.php
*custom folder in website root. The whole folder (if you’re doing upgrade safe customizations they all should be here)

Install a fresh install of 7.0.2
then import your Database backup.
Fix your config.php conifg_overrides.php to work with old data new database (new database name and password will be in new config)
upload your custom folder to server overwriting existing files.

Test your update by accessing SuiteCRM install paying attention to the errors you get to fix any issues. IE Database Access error (invalid database, invalid user/password)