SuiteCRM 7.11.6 Database Failure

Hi,

My setup:

WAMPSERVER 3.1.3

APACHE 2.4.33
PHP 7.1.16
MySQL 5.7.21

I got this problem trying to update to 7.11.7

Database failure. Please refer to suitecrm.log for details.

Thu Aug 1 09:36:59 2019 [1704][1][FATAL] Mysqli_query failed.
Thu Aug 1 09:36:59 2019 [1704][1][FATAL] Query Failed: ALTER TABLE users modify COLUMN first_name varchar(255) NULL , modify COLUMN last_name varchar(255) NULL : MySQL error 1071: Specified key was too long; max key length is 1000 bytes
Thu Aug 1 09:36:59 2019 [1704][1][FATAL] Exception handling in C:\wamp64\www\CRM\include\MVC\Controller\SugarController.php:400
Thu Aug 1 09:36:59 2019 [1704][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Thu Aug 1 09:36:59 2019 [1704][1][FATAL] backtrace:
#0 C:\wamp64\www\CRM\include\database\DBManager.php(353): sugar_die(‘Database failur…’)
#1 C:\wamp64\www\CRM\include\database\DBManager.php(328): DBManager->registerError(’ Query Failed: …’, ’ Query Failed: …’, ‘Error with MySQ…’)
#2 C:\wamp64\www\CRM\include\database\MysqliManager.php(179): DBManager->checkError(’ Query Failed: …’, ‘Error with MySQ…’)
#3 C:\wamp64\www\CRM\include\database\MysqlManager.php(616): MysqliManager->query(‘ALTER TABLE use…’, ‘Error with MySQ…’)
#4 C:\wamp64\www\CRM\include\database\DBManager.php(764): MysqlManager->repairTableParams(‘users’, Array, Array, true, NULL)
#5 C:\wamp64\www\CRM\modules\UpgradeWizard\end.php(86): DBManager->repairTable(Object(Group), true)
#6 C:\wamp64\www\CRM\modules\UpgradeWizard\index.php(296): require(‘C:\wamp64\www\C…’)
#7 C:\wamp64\www\CRM\include\MVC\View\SugarView.php(834): include_once(‘C:\wamp64\www\C…’)
#8 C:\wamp64\www\CRM\include\MVC\View\views\view.classic.php(72): SugarView->includeClassicFile(‘modules/Groups/…’)
#9 C:\wamp64\www\CRM\include\MVC\View\SugarView.php(226): ViewClassic->display()
#10 C:\wamp64\www\CRM\include\MVC\Controller\SugarController.php(435): SugarView->process()
#11 C:\wamp64\www\CRM\include\MVC\Controller\SugarController.php(375): SugarController->processView()
#12 C:\wamp64\www\CRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#13 C:\wamp64\www\CRM\index.php(52): SugarApplication->execute()
#14 {main}

Anyone can help me please

Please make this change manually, and try again:

https://github.com/salesagility/SuiteCRM/pull/7510/files

Are you trying to upgrade to 7.11.7, or to 7.11.6? And which version are you upgrading from?

To me, it would make sense to get that error going into 7.11.6, but not to 7.11.7 :huh:

I updated from 7.11.04 to 7.11.7 and got the same error at the end of upgrade. To solve it I went to apply the change from the link @pgr posted. Next I went to run a QR&R and all seems to be ok now.

Thanks,

AlxGr

Forgot to mentioned that when QR&R you need to commit the changes to the database at the bottom of the page.

Thanks,

AlxGr

Hi to all … Thank you , Apply the solution works , but now upgradiing to 7.11.7 got this.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097160 bytes) in C:\wamp64\www\CRM\include\dir_inc.php on line 260
Call Stack

Time Memory Function Location

1 0.0000 369288 {main}( ) …\index.php:0
2 0.2812 15307968 SugarApplication->execute( ) …\index.php:52
3 0.3281 17591536 SugarController->execute( ) …\SugarApplication.php:113
4 0.3281 17591472 SugarController->processView( ) …\SugarController.php:375
5 0.3281 17944600 ViewClassic->process( ) …\SugarController.php:435
6 0.4844 21292016 ViewClassic->display( ) …\SugarView.php:226
7 0.4844 21292072 ViewClassic->includeClassicFile( ) …\view.classic.php:72
8 0.4844 21363904 include_once( ‘C:\wamp64\www\CRM\modules\UpgradeWizard\index.php’ ) …\SugarView.php:834
9 4.9219 49971944 require( ‘C:\wamp64\www\CRM\modules\UpgradeWizard\end.php’ ) …\index.php:296
10 98.4082 78613504 unlinkUWTempFiles( ) …\end.php:224
11 98.4082 78613552 findAllFiles( ) …\uw_utils.php:2268
12 113.6738 82970760 findAllFiles( ) …\dir_inc.php:257
13 114.6582 84067360 findAllFiles( ) …\dir_inc.php:257
14 136.6895 85876384 findAllFiles( ) …\dir_inc.php:257
15 165.7520 92341096 findAllFiles( ) …\dir_inc.php:257
16 168.0332 96605216 findAllFiles( ) …\dir_inc.php:257
17 168.1426 100804664 findAllFiles( ) …\dir_inc.php:257
18 168.1738 105000760 findAllFiles( ) …\dir_inc.php:257
19 168.2363 109196672 findAllFiles( ) …\dir_inc.php:257
20 168.2363 113391984 findAllFiles( ) …\dir_inc.php:257
21 168.2363 117587608 findAllFiles( ) …\dir_inc.php:257

That one is easy, just raise your memory_limit in your php.ini and restart XAMPP. Make it at least 256M, better with 512M.

While you’re there in your php.ini…

  • turn off display_errors
  • note where your errors log is located, and learn to keep an eye on it
  • increase max_execution_time, max_post_size, max_upload_size if it feels appropriate to you