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`, `specialImage`.`id` AS `t2_c0`, `specialImage`.`original_uid` AS `t2_c1`, `specialImage`.`original_width` AS `t2_c2`, `specialImage`.`original_height` AS `t2_c3`, `specialImage`.`cropped_uid` AS `t2_c4`, `specialImage`.`crop_x` AS `t2_c5`, `specialImage`.`crop_y` AS `t2_c6`, `specialImage`.`crop_width` AS `t2_c7`, `specialImage`.`crop_height` AS `t2_c8`, `specialImage`.`type` AS `t2_c9`, `specialImage`.`author_id` AS `t2_c10`, `specialImage`.`is_used` AS `t2_c11`, `specialImage`.`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` `specialImage` ON (`newsInfo`.`special_image_id`=`specialImage`.`id`) WHERE (t.status=:ycp2 AND t.type=:ycp3 AND t.is_verified=:ycp4) AND (site_id = 13 AND is_special = 1 AND is_donbass = 0 AND is_votes2015 = 0 AND is_arctic = 0 AND starting_date <= '2024-03-29 15:04:24' AND '2024-03-29 15:04:24' <= ending_date ) ORDER BY newsInfo.special_order, special_order. Bound with :ycp2='published', :ycp3='news', :ycp4=1

/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(90): CActiveRecord->findAll(CDbCriteria)
85             'newsInfo' => array(
86                 'condition' => 'site_id = ' . (int)$siteId . ' AND is_special = 1 AND is_donbass = 0 AND is_votes2015 = 0 AND is_arctic = 0 AND starting_date <= \'' . $now . '\' AND \'' . $now . '\' <= ending_date ',
87                 'order' => 'special_order'
88             ),
89             'newsInfo.specialImage'
90         ))->findAll($criteria);
91 
92         return $news;
93     }
94 
95     public static function getDonbassNews($count = 5)
#7
+
 /var/www/html/protected/models/articles/News.php(152): News::getSiteSpecialNewsList("13")
147     }
148 
149     public static function getSpecialNewsListForMainPage($siteId, $count = 5, $isNewsGallery = false, $type = 'news')
150     {
151         $now = date('Y-m-d H:i:s');
152         $news = self::getSiteSpecialNewsList($siteId);
153 
154         $newsNumber = count($news);
155 
156         if ($newsNumber < $count) {
157             $criteria = new CDbCriteria();
#8
+
 /var/www/html/protected/components/BaseController.php(72): News::getSpecialNewsListForMainPage("13")
67             ]);
68         }
69 
70         $this->photoReports = PhotoAlbum::getList();
71 
72         $this->specialNews = News::getSpecialNewsListForMainPage($this->currentSiteId);
73     }
74 }
2024-03-29 15:04:29 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='jpcl3ovtj4pbthq3pfdk75br97'