CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`url` AS `t0_c1`, `t`.`type` AS `t0_c2`, `t`.`info_id` AS `t0_c3`, `t`.`congress_id` AS `t0_c4`, `t`.`has_top_image` AS `t0_c5`, `t`.`top_image_id` AS `t0_c6`, `t`.`top_title` AS `t0_c7`, `t`.`author_id` AS `t0_c8`, `t`.`publisher_id` AS `t0_c9`, `t`.`status` AS `t0_c10`, `t`.`created_at` AS `t0_c11`, `t`.`is_verified` AS `t0_c12`, `t`.`in_rss` AS `t0_c13`, `newsInfo`.`id` AS `t1_c0`, `newsInfo`.`site_id` AS `t1_c1`, `newsInfo`.`title` AS `t1_c2`, `newsInfo`.`starting_date` AS `t1_c3`, `newsInfo`.`on_main_site` AS `t1_c4`, `newsInfo`.`description` AS `t1_c5`, `newsInfo`.`ending_date` AS `t1_c6`, `newsInfo`.`use_header_image` AS `t1_c7`, `newsInfo`.`header_image_id` AS `t1_c8`, `newsInfo`.`title_x` AS `t1_c9`, `newsInfo`.`title_y` AS `t1_c10`, `newsInfo`.`title_colour` AS `t1_c11`, `newsInfo`.`title_location` AS `t1_c12`, `newsInfo`.`title_position` AS `t1_c13`, `newsInfo`.`is_special` AS `t1_c14`, `newsInfo`.`special_image_id` AS `t1_c15`, `newsInfo`.`special_is_video` AS `t1_c16`, `newsInfo`.`first_photo_gallery_id` AS `t1_c17`, `newsInfo`.`special_order` AS `t1_c18`, `newsInfo`.`is_votes2015` AS `t1_c19`, `newsInfo`.`is_arctic` AS `t1_c20`, `newsInfo`.`is_donbass` AS `t1_c21`, `newsInfo`.`is_pin` AS `t1_c22`, `headerImage`.`id` AS `t2_c0`, `headerImage`.`original_uid` AS `t2_c1`, `headerImage`.`original_width` AS `t2_c2`, `headerImage`.`original_height` AS `t2_c3`, `headerImage`.`cropped_uid` AS `t2_c4`, `headerImage`.`crop_x` AS `t2_c5`, `headerImage`.`crop_y` AS `t2_c6`, `headerImage`.`crop_width` AS `t2_c7`, `headerImage`.`crop_height` AS `t2_c8`, `headerImage`.`type` AS `t2_c9`, `headerImage`.`author_id` AS `t2_c10`, `headerImage`.`is_used` AS `t2_c11`, `headerImage`.`created_at` AS `t2_c12` FROM `article` `t` LEFT OUTER JOIN `news_article_info` `newsInfo` ON (`t`.`info_id`=`newsInfo`.`id`) LEFT OUTER JOIN `image` `headerImage` ON (`newsInfo`.`header_image_id`=`headerImage`.`id`) WHERE (t.type = 'news' AND status = 'published' AND t.is_verified = 1) AND (site_id = :siteId AND is_special = 0 OR (site_id = :siteId AND starting_date <= :now)) ORDER BY newsInfo.starting_date DESC LIMIT 20. Bound with :siteId=56, :now='2024-03-29 18:54:43'

/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

#6
+
 /var/www/html/protected/models/articles/News.php(241): CActiveRecord->findAll(array("order" => "newsInfo.starting_date DESC", "condition" => "t.type = 'news' AND status = 'published' AND t.is_verified = 1", "limit" => 20))
236             'galleryBlocks',
237         ])->findAll([
238             'order' => 'newsInfo.starting_date DESC',
239             'condition' => 't.type = \'' . $type . '\' AND status = \'published\' AND t.is_verified = 1',
240             'limit' => $count
241         ]);
242 
243         return $news;
244     }
245 
246     public static function getAllNewsListForTable($siteId = null, $start = 0, $count = 10, $type = 'news')
#7
+
 /var/www/html/protected/controllers/SiteController.php(1013): News::getList("56")
1008         }
1009 
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') {
#17
+
 /var/www/html/index.php(17): CApplication->run()
12 defined('YII_DEBUG') or define('YII_DEBUG', Config::$debug);
13 
14 require_once ROOT_PATH . '/protected/libs/framework/yii.php' ;
15 $config = ROOT_PATH . '/configs/yii.php';
16 
17 Yii::createWebApplication($config)->run();
2024-03-29 18:54:46 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='5631va6kq6826h0g4ajgmn1tb3'