CDbException

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

/home/dienlanhts/domains/dienlanhthanhson.vn/public_html/lib/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

#12
+
 /home/dienlanhts/domains/dienlanhthanhson.vn/public_html/protected/components/WebApplication.php(18): CApplication->run()
13 
14     public function runEnd($name) {
15         $this->__name = $name;
16         $this->onRunEnd = array(&$this, 'changePath');
17         $this->onRunEnd(new CEvent($this->owner));
18         $this->owner->run();
19     }
20 
21     public function onRunEnd(CEvent $event) {
22         $this->raiseEvent('onRunEnd', $event);
23     }
#15
+
 /home/dienlanhts/domains/dienlanhthanhson.vn/public_html/index.php(10): CComponent->__call("runEnd", array("user"))
05 // remove the following lines when in production mode
06 defined('YII_DEBUG') or define('YII_DEBUG', true);
07 // specify how many levels of call stack should be shown in each log message
08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
09 require_once($yii);
10 Yii::createWebApplication($config)->runEnd('user');
11 
#16
+
 /home/dienlanhts/domains/dienlanhthanhson.vn/public_html/index.php(10): CWebApplication->runEnd("user")
05 // remove the following lines when in production mode
06 defined('YII_DEBUG') or define('YII_DEBUG', true);
07 // specify how many levels of call stack should be shown in each log message
08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
09 require_once($yii);
10 Yii::createWebApplication($config)->runEnd('user');
11 
2024-03-19 13:37:30 Apache/2 Yii Framework/1.1.15