CDbException

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

/srv/onlystrategic.com/releases/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
+
 /srv/onlystrategic.com/releases/20130808131418/protected/components/Controller.php(131): CActiveRecord->find("domain = :id", array("id" => "insurance"))
126     private function getDomain(){
127     
128         $address = explode('.',$_SERVER['SERVER_NAME']);
129             
130         
131         $site = Sites::model()->find('domain = :id',array('id'=>$address[0]));
132             
133         
134             if($site){
135                 return array('path' => $site->path,
136                 'title' => $site->title,    
#8
+
 /srv/onlystrategic.com/releases/20130808131418/protected/components/Controller.php(63): Controller->getDomain()
58         
59         }
60         else{
61         
62             //check to see if brand sub domain
63             $args = $this->getDomain();
64             
65         
66             //print_r($address);
67         
68         }
#12
+
 /srv/onlystrategic.com/releases/20130808131418/index.php(17): CApplication->run()
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 
15 require_once($yii);
16 
17 Yii::createWebApplication($config)->run();?>
2024-03-19 11:01:02 Apache Yii Framework/1.1.19