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\widgets\grid\bannersWidget.php(25): CActiveRecord->findAll(CDbCriteria)
20         $criteria = new CDbCriteria;
21         $criteria->condition = 't.isActive = 1';
22         $criteria->order = 't.order ASC';
23         $criteria->limit = $this->limit;
24 
25         $banners = Banners::model()->findAll($criteria);
26 
27         $this->render($this->themepath() . '.banners', array(
28             'banners' => $banners
29         ));
30     }
#8
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\views\site\index.php(39): BannersWidget->index()
34         <?php
35         //Statistics widget
36         //$this->widget('application.widgets.grid.statistics')->index();
37         
38         //Banners widget
39         $this->widget('application.widgets.grid.bannersWidget')->index();
40         ?>
41 
42         <div class="wrapper clearfix">
43             <div class="index_left">
44                 <?php
#13
+
 S:\WebSites\WinPredict\Prod\Site\WebSite\content\protected\controllers\SiteController.php(223): CController->render("index")
218                         'username' => $_GET['username'],
219                         'state' => $_GET['state'],
220                             )
221             ));
222         }
223         $this->render('index');
224     }
225 
226     /**
227      * Displays the login page
228      */
2024-04-18 21:30:47 Microsoft-IIS/7.5 Yii Framework/1.1.15