CDbException

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

/home2/asaltest/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
+
 /home2/asaltest/public_html/protected/controllers/SiteController.php(259): CActiveRecord->findByPk("48")
254             
255         }
256         
257  public function actionPage($id)
258         {
259             $model=Post::model()->findByPK($id);
260             
261             $this->pageTitle = $model->desc->name;
262 
263     Yii::app()->clientScript->registerMetaTag( $model->desc->meta_keyword, 'keywords');
264     Yii::app()->clientScript->registerMetaTag( $model->desc->meta_description, 'description');
#17
+
 /home2/asaltest/public_html/index.php(27): CApplication->run()
22 
23 
24 
25 require_once($yii);
26 
27 Yii::createWebApplication($config)->run();
28 
2024-03-29 04:28:55 Apache Yii Framework/1.1.14