CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. The SQL statement executed was: SHOW CREATE TABLE `article_text_with_quote_block`

/var/www/html/protected/libs/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#9
+
 /var/www/html/protected/models/articles/Article.php(580): CActiveRecord->findAll(CDbCriteria)
575 
576         foreach ($models as $key => $model) {
577             if (is_array($model)) {
578                 $blocks = call_user_func(array($key, 'model'))->with($model)->findAll($criteria);
579             } else {
580                 $blocks = call_user_func(array($model, 'model'))->findAll($criteria);
581             }
582 
583             foreach ($blocks as $block) {
584                 $order = $block->order * 100;
585 
#10
+
 /var/www/html/protected/models/articles/Article.php(425): Article->_getBlocksFromModels(array(0 => "ArticleTextBlock", 1 => "ArticleTextWithQuoteBlock", "ArticlePhotoBlock" => array("image"), "ArticlePhotoGalleryBlock" => array("blockImage", "blockImage.image"), ...))
420             'ArticleTextWithTeaserBlock',
421             'ArticleVideoBlock',
422             'ArticleInsetBlock'
423         );
424 
425         $blocks = $this->_getBlocksFromModels($models);
426 
427         ksort($blocks);
428 
429         return $blocks;
430     }
#11
+
 /var/www/html/protected/controllers/SiteController.php(1015): Article->getBlocks()
1010         shuffle($relatedArticles);
1011         $news->relatedArticles = array_slice($relatedArticles, 0, 6);
1012 
1013         $newsList = News::getList($this->currentSiteId);
1014 
1015         $blocks = $news->getBlocks();
1016 
1017         foreach ($blocks as $block) {
1018             if ($block->getClassName() == 'ArticleTextWithQuoteBlock') {
1019                 Initiative::insertQuoteInText($block);
1020             }
2024-03-29 18:46:38 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.14
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. The SQL statement executed was: SELECT `id` FROM `session` WHERE id=:id. Bound with :id='r3bnrt5a7kul12t2s7dmni6564'