CDbException

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

S:\WebSites\WinPredict\Prod\Site\WebSite\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
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\controllers\NewsController.php(81): CActiveRecord->find(CDbCriteria)
76         $criteria_top->condition = 't.top = 1 AND t.active = 1';
77         if($sportid > 0){
78             $criteria_top->with = array('sports' => array('together' => true));
79             $criteria_top->compare('sports.sport_id', $sportid, true);
80         }
81         $top = News::model()->find($criteria_top);
82 
83         // Source list
84         $sourceList = News::getSources();
85         $sourceListImages = News::getSourcesImage();
86 
#15
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\index.php(53): CApplication->run()
48 // specify how many levels of call stack should be shown in each log message
49 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
50 
51 require_once($env->yiiPath);
52 $env->runYiiStatics();
53 Yii::createWebApplication($env->configWeb)->run();
2024-04-18 20:53:52 Microsoft-IIS/7.5 Yii Framework/1.1.15