CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted. The SQL statement executed was: SHOW CREATE TABLE `news_article_info`

/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

#14
+
 /var/www/html/protected/components/BaseController.php(67): CActiveRecord->findAll(array("condition" => "t.status = "published" AND t.is_verified = "1" AND t.type = "new...", "params" => array(":site_id" => 5), "order" => "newsInfo.starting_date DESC", "limit" => 10))
62             $this->specialRegionNewsList = Article::model()->with(['newsInfo', 'newsInfo.site'])->findAll([
63                 'condition' => 't.status = "published" AND t.is_verified = "1" AND t.type = "news" AND newsInfo.site_id = :site_id',
64                 'params' => [':site_id' => 5],
65                 'order' => 'newsInfo.starting_date DESC',
66                 'limit' => 10,
67             ]);
68         }
69 
70         $this->photoReports = PhotoAlbum::getList();
71 
72         $this->specialNews = News::getSpecialNewsListForMainPage($this->currentSiteId);
#15
+
 /var/www/html/protected/controllers/SiteController.php(20): BaseController->init()
15     public $bugReportForm;
16 
17     public $slogan;
18 
19     public function init() {
20         parent::init();
21 
22         if (!Yii::app()->user->isGuest && Yii::app()->user->getState('role') == 'user') {
23             $this->siteUser = User::model()->with(['avatar', 'cityInfo'])->findByPk(Yii::app()->user->id, 'deleted IS NULL');
24         } elseif (!Yii::app()->user->isGuest && Yii::app()->user->getState('role') == 'admin') {
25             $admin = Admin::model()->with('user')->findByPk(Yii::app()->user->id);
#19
+
 /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 15:04:28 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='0q5dg2e8srhj9f06s3dudkv4p4'