[solved] 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Profile picture for user davidah3
davidah3
Forums
Hi everybody! When I try to add a certificate i got this: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/AMPPS/www/www.lms.com/includes/database/database.inc:2168 Stack trace: #0 /Applications/AMPPS/www/www.lms.com/includes/database/database.inc(2168): PDOStatement->execute(Array) #1 /Applications/AMPPS/www/www.lms.com/includes/database/database.inc(680): DatabaseStatementBase->execute(Array, Array) #2 /Applications/AMPPS/www/www.lms.com/includes/database/database.inc(2347): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /Applications/AMPPS/www/www.lms.com/includes/lock.inc(167): db_query('SELECT expire, ...', Array) #4 /Applications/AMPPS/www/www.lms.com/includes/lock.inc(146): lock_may_be_available('theme_registry:...') #5 /Applications/AMPPS/www/www.lms.com/includes/theme.inc(449): lock_acquire('theme_registry:...') #6 /Applications/AMPPS/www/www.lms.com/includes/bootstrap.inc(446): ThemeRegistry->set(Array) #7 [internal function]: DrupalCacheArray->__destruct() # in /Applications/AMPPS/www/www.lms.com/includes/database/database.inc on line 2168 Can i fix it or need a good Doctor? Regards
wadmiraal

What version of Opigno are

What version of Opigno are you using ?
wadmiraal

Wait, I the error is "MySQL

Wait, I see the error is "MySQL Server went away". 90% of the time, this is because of a "low" MySQL setting. I see your using AMPPS - do you know where to find the `my.cnf` file ? If so, can you check the `max_allowed_packet` setting (should be under the `[mysqld]` group) ? If it is not present, it uses a default (and pretty low) value. Opigno performs some sizable queries. You might want to try increasing the value (or adding it, if it's not present - if you do, **make sure to add it under the `[mysqld]` group**). For example: [mysqld] max_allowed_packet = 4M
Profile picture for user davidah3
davidah3

Fixed

The max_allowed_packet setting was 1M, I set it with 4M and doesn't works, then set 10M and it works. Sorry about my little english level. Thank you so much wadmiraal !