CDbException

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

/var/www/draluk/data/www/yii/framework/db/CDbConnection.php(399)

387                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
388             try
389             {
390                 Yii::trace('Opening DB connection','system.db.CDbConnection');
391                 $this->_pdo=$this->createPdoInstance();
392                 $this->initConnection($this->_pdo);
393                 $this->_active=true;
394             }
395             catch(PDOException $e)
396             {
397                 if(YII_DEBUG)
398                 {
399                     throw new CDbException('CDbConnection failed to open the DB connection: '.
400                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
401                 }
402                 else
403                 {
404                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
405                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
406                 }
407             }
408         }
409     }
410 
411     /**

Stack Trace

#7
+
 /var/www/draluk/data/www/draluk.ru/protected/components/JController.php(90): CActiveRecord->findByAttributes(array("handle" => "home"))
85         //$cs->registerCssFile(Yii::app()->request->baseUrl . '/css/collection.css');
86         //$cs->registerCssFile(Yii::app()->request->baseUrl . '/css/app.css');
87         //$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/bootstrap.min.js', CClientScript::POS_HEAD);
88         //$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/misc.js', CClientScript::POS_END);
89 
90         $section_home = Section::model()->findByAttributes(array('handle' => 'home'));
91         $this->sections = $section_home->children()->published()->has_in_menu()->findAll();
92 
93         //$this->sections_sidemenu = false;
94         $service_root = Service::model()->findByAttributes(array('handle' => 'root'));
95         $this->sections_sidemenu = $service_root->children()->published()->findAll();
#11
+
 /var/www/draluk/data/www/draluk.ru/index.php(27): CApplication->run()
22 
23 if (defined('YII_DEBUG')) {
24     error_reporting(E_ALL);
25 }
26 
27 Yii::createWebApplication($config)->run();
2024-03-19 09:12:27 Apache/2.4.6 () OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 Yii Framework/1.1.16