SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
#0 [internal function]: PDO->query('SELECT IF(COUNT...')
#1 [internal function]: Phalcon\Db\Adapter\Pdo->query('SELECT IF(COUNT...', NULL, NULL)
#2 [internal function]: Phalcon\Db\Adapter->fetchOne('SELECT IF(COUNT...', 3)
#3 [internal function]: Phalcon\Db\Adapter->tableExists('modelprofile', 'wemodel')
#4 [internal function]: Phalcon\Mvc\Model\MetaData\Strategy\Introspection->getMetaData(Object(App\Models\Entities\Modelprofile), Object(Phalcon\Di\FactoryDefault))
#5 [internal function]: Phalcon\Mvc\Model\MetaData->_initialize(Object(App\Models\Entities\Modelprofile), 'app\\models\\enti...', 'modelprofile', 'wemodel')
#6 [internal function]: Phalcon\Mvc\Model\MetaData->readMetaData(Object(App\Models\Entities\Modelprofile))
#7 [internal function]: Phalcon\Mvc\Model\MetaData->hasAttribute(Object(App\Models\Entities\Modelprofile), 'modeluser_id')
#8 [internal function]: Phalcon\Mvc\Model\Query->_getQualified(Array)
#9 [internal function]: Phalcon\Mvc\Model\Query->_getExpression(Array, true)
#10 [internal function]: Phalcon\Mvc\Model\Query->_getExpression(Array)
#11 [internal function]: Phalcon\Mvc\Model\Query->_prepareSelect()
#12 [internal function]: Phalcon\Mvc\Model\Query->parse()
#13 [internal function]: Phalcon\Mvc\Model\Query->execute()
#14 /var/www/html/wemodelbs/app/models/entities/Modelprofile.php(346): Phalcon\Mvc\Model::findFirst(Array)
#15 /var/www/html/wemodelbs/app/models/ModeluserInfo.php(1218): App\Models\Entities\Modelprofile::findFirst(Array)
#16 /var/www/html/wemodelbs/app/controllers/Index/ModelsController.php(314): ModeluserInfo->getPublicInfoFromId(49606)
#17 [internal function]: App\Controllers\Index\ModelsController->photoAction()
#18 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(App\Controllers\Index\ModelsController), 'photoAction', Array)
#19 [internal function]: Phalcon\Dispatcher->_dispatch()
#20 [internal function]: Phalcon\Dispatcher->dispatch()
#21 /var/www/html/wemodelbs/public/index.php(52): Phalcon\Mvc\Application->handle()
#22 {main}