CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1040] Too many connections

/home/krunucya/domains/krunucya.com/public_html/yii/framework/db/CDbConnection.php(382)

370                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
371             try
372             {
373                 Yii::trace('Opening DB connection','system.db.CDbConnection');
374                 $this->_pdo=$this->createPdoInstance();
375                 $this->initConnection($this->_pdo);
376                 $this->_active=true;
377             }
378             catch(PDOException $e)
379             {
380                 if(YII_DEBUG)
381                 {
382                     throw new CDbException('CDbConnection failed to open the DB connection: '.
383                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
384                 }
385                 else
386                 {
387                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
388                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
389                 }
390             }
391         }
392     }
393 
394     /**

Stack Trace

#7
+
 /home/krunucya/domains/krunucya.com/public_html/protected/models/SiteContent.php(221): CActiveRecord::model("SiteContent")
216      * @param string $className active record class name.
217      * @return SiteContent the static model class
218      */
219     public static function model($className=__CLASS__)
220     {
221         return parent::model($className);
222     }
223 }
#8
+
 /home/krunucya/domains/krunucya.com/public_html/protected/controllers/SiteController.php(53): SiteContent::model()
48     }
49     // страница с товаром
50     public function actionProduct(){
51         $id = Yii::app()->request->getQuery('id');
52         $id = $id*1;
53         $proverka=SiteContent::model()->findByPk($id);
54         if(!$proverka) $this->redirect('/');
55         else
56         {
57         if($this->FindGroup($id))$this->redirect('/group/'.$id);
58         $cont_product = SiteContent::model()->findByPk($id);
#16
+
 /home/krunucya/domains/krunucya.com/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
11 require_once($yii);
12 
13 Yii::createWebApplication($config)->run();
2024-03-28 20:53:01 Apache/2 Yii Framework/1.1.14-dev