Internal Server Error - PDOStatement - MySQL Server has gone away

Greetings,

Our Nextcloud installation just started having Internal Server Errors for every user who tries to login. Both LDAP users and the local admin user we created. I’ve tried the normal updates, running few ./occ commands and everything looks fine. However I am not a developer so I do not know if this is on the Nextcloud side or something that has changed with our DB.

Errors in Nextcloud.log when a user tries to login.

{"reqId":"WNwDMLn5K4ttXJkRvt7uPQAAAAY","remoteAddr":"192.168.200.10","app":"PHP","message":"PDOStatement::execute(): MySQL server has gone away at \/home\/admin\/web\/mydomain.tld\/public_html\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/PDOStatement.php#91","level":3,"time":"2017-03-29T18:55:58+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}
{"reqId":"WNwDMLn5K4ttXJkRvt7uPQAAAAY","remoteAddr":"192.168.200.10","app":"PHP","message":"PDOStatement::execute(): Error reading result set's header at \/home\/admin\/web\/nc.ngtnet.net\/public_html\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/PDOStatement.php#91","level":3,"time":"2017-03-29T18:55:58+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}
{"reqId":"WNwDMLn5K4ttXJkRvt7uPQAAAAY","remoteAdr":"192.168.200.10","app":"index","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'SELECT `uid`, `password` FROM `oc_users` WHERE LOWER(`uid`) = LOWER(?)' with params [\\\"mark.laudenbach\\\"]:\\n\\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\#1 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Statement.php(178): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'ELECT `uid`, `...', Array)\\n#2 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/legacy\\\/db\\\/statementwrapper.php(74): Doctrine\\\\DBAL\\\\Statement->execute(Array)\\n#3 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/User\\\/Database.php(216): OC_DB_StatementWrapper->execute(Array)\\#4 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/User\\\/Manager.php(193): OC\\\\User\\\\Database->checkPassword(*** sensitive parameters rplaced ***)\\n#5 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/core\\\/Controller\\\/LoinController.php(221): OC\\\\User\\\\Manager->checkPassword(*** sensitive parameters replaced ***)\\n#6 [internal function]: OC\\\\Core\\\\Controller\\\\LoginController->tryLogin(*** sensitive parameters replaced ***)\\n#7 \\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\n#8 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher>executeController(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n#9 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/ib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n#10 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.ne\\\/public_html\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('LoginController', 'tryLogin', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#13 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/lib\\\/base.php(1010): OC\\\\Route\\\\Router->match('\\\/login')\\#14 \\\/home\\\/admin\\\/web\\\/nc.ngtnet.net\\\/public_html\\\/index.php(40): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/home\\\/admin\\\/web\\\/nc.ngnet.net\\\/public_html\\\/3rdparty\\\/doctrine\\\/dal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","level":3,"time":"2017-03-29T18:55:58+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}

We are running CentOS 7.2. PHP 5.6.30. MariaDB 5.5.52.

I appreciate any help you can offer in resolving this issue.

Thank you for your time and help.

Mark